#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
	freopen("army.in", "r", stdin);
	freopen("army.out", "w", stdout);
	int n, m;
	cin >> n >> m;
	vector<int> a(n);
	for (int i = 0; i < n; i++)
		cin >> a[i];

   	for (int i = 0; i < m; i++)
   	{
   		string s;
   		cin >> s;
   		if (s == "?")
   		{
   			bool f =  true;
   			for (int j = n - 1; j > 0; j--)
   				if (a[j - 1] > a[j])
   				{
   					f = false;
   					break;
   				}
   			cout << (f ? "YES\n" : "NO\n");
   		}
   		else
   		{
   			int p, x;
   			cin >> p >> x;
   			a[p - 1] = x;
   		}
   	}
}
