#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>

using namespace std;

int main()
{
	freopen("army.in", "r", stdin);
	freopen("army.out", "w", stdout);
	int n, m;
	cin >> n >> m;
	assert(1 <= n && n <= 1e4);
	assert(0 <= m && m <= 1e4);
	vector<int> a(n + 2);
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		assert(0 <= a[i] && a[i] <= 1e9);
	}
	a[0] =  -2e9;
	a[n + 1] = 2e9;
	int cnt = 0;
	for (int i = 1; i <= n + 1; i++)
		cnt += a[i] < a[i - 1];
   	
   	for (int i = 0; i < m; i++)
   	{
   		string s;
   		cin >> s;
   		if (s == "?") cout << ((cnt == 0) ? "YES\n" : "NO\n");
   		else
   		{
   			int p, x;
   			cin >> p >> x;
   			assert(1 <= p && p <= n);
   			assert(0 <= x && x <= 1e9);
   			cnt -= (a[p - 1] > a[p]) + (a[p] > a[p + 1]);
   			a[p] = x;
   			cnt += (a[p - 1] > a[p]) + (a[p] > a[p + 1]);

   		}
   	}
}
