#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#include <algorithm>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using Graph= vector<vector<ll>>;
struct edge{ll to ; ll cost ;} ;
using graph =vector<vector<edge>> ;
#define rep(i,n) for (ll i=0; i < (n); ++i)
#define rep2(i,n,m) for(ll i=n;i<=m;i++)
#define rep3(i,n,m) for(ll i=n;i>=m;i--)
#define pb push_back 
#define eb emplace_back 
#define ppb pop_back 
#define mpa make_pair 
#define fi first  
#define se second  
#define set20 cout<<fixed<<setprecision(20) ;  
const ll INF=1e18 ;   
inline void chmax(ll& a,ll b){a=max(a,b);}  
inline void chmin(ll& a,ll b){a=min(a,b);} 
double pi=acos(-1) ;  
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}  
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;} 
template< typename Monoid >
struct SegmentTree {
  using F = function< Monoid(Monoid, Monoid) >;

  int sz;
  vector< Monoid > seg;

  const F f;
  const Monoid M1;

  SegmentTree(int n, const F f, const Monoid &M1) : f(f), M1(M1) {
    sz = 1;
    while(sz < n) sz <<= 1;
    seg.assign(2 * sz, M1);
  }

  void set(int k, const Monoid &x) {
    seg[k + sz] = x;
  }

  void build() {
    for(int k = sz - 1; k > 0; k--) {
      seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
    }
  }

  void update(int k, const Monoid &x) {
    k += sz;
    seg[k] = x;
    while(k >>= 1) {
      seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
    }
  }

  Monoid query(int a, int b) {
    Monoid L = M1, R = M1;
    for(a += sz, b += sz; a < b; a >>= 1, b >>= 1) {
      if(a & 1) L = f(L, seg[a++]);
      if(b & 1) R = f(seg[--b], R);
    }
    return f(L, R);
  }

  Monoid operator[](const int &k) const {
    return seg[k + sz];
  }

  template< typename C >
  int find_subtree(int a, const C &check, Monoid &M, bool type) {
    while(a < sz) {
      Monoid nxt = type ? f(seg[2 * a + type], M) : f(M, seg[2 * a + type]);
      if(check(nxt)) a = 2 * a + type;
      else M = nxt, a = 2 * a + 1 - type;
    }
    return a - sz;
  }


  template< typename C >
  int find_first(int a, const C &check) {
    Monoid L = M1;
    if(a <= 0) {
      if(check(f(L, seg[1]))) return find_subtree(1, check, L, false);
      return -1;
    }
    int b = sz;
    for(a += sz, b += sz; a < b; a >>= 1, b >>= 1) {
      if(a & 1) {
        Monoid nxt = f(L, seg[a]);
        if(check(nxt)) return find_subtree(a, check, L, false);
        L = nxt;
        ++a;
      }
    }
    return -1;
  }

  template< typename C >
  int find_last(int b, const C &check) {
    Monoid R = M1;
    if(b >= sz) {
      if(check(f(seg[1], R))) return find_subtree(1, check, R, true);
      return -1;
    }
    int a = sz;
    for(b += sz; a < b; a >>= 1, b >>= 1) {
      if(b & 1) {
        Monoid nxt = f(seg[--b], R);
        if(check(nxt)) return find_subtree(b, check, R, true);
        R = nxt;
      }
    }
    return -1;
  }
};



int main(){
   ll n, q ; cin>>n>>q ;
   SegmentTree<ll> A(n,[] (ll a,ll b) {return ll (a^b) ;},0ll) ;
   vector<ll> B(n) ;
   rep(i,n){
       ll jj ; cin>>jj ;
       B[i] = jj ;
       A.set(i+1,jj) ;
   }
   A.build() ;
   while(q--){
    ll t, x,y ; cin>>t>>x>>y ;
    if(t==1){
       
        ll yy=B[x-1]^y ;
        A.update(x,yy) ;
        B[x-1]=yy ;
    }
    else cout<<A.query(x,y+1)<<endl ;
   }
   return 0 ;
}
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
typedef long long int ll;
typedef long double ld;
 
#define endl '\n'
#define loop(i,m,n) for(int i=m;i<n;i++)
#define loope(i,m,n) for(int i=m;i<=n;i++)
#define epool(i,m,n) for(int i=m;i>=n;i--)
#define mod 1000000007
#define mod2 998244353
#define deb(x) cerr << #x << " = " << (x) << endl;
#define deb2(x,y) cerr << "[" << #x << " = " << (x) << ", " << #y << " = " << (y) << "]" << endl;                                                                           
#define vl vector<ll>
#define vi vector<int> 
#define pii pair<int,int> 
#define pll pair<ll,ll>
#define fi first
#define se second
#define pb push_back
#define MP make_pair
#define empf emplace_front
#define empb emplace_back
#define ret(x) return cout << x,0;
#define all(v) v.begin(),v.end() 
#define umap unordered_map<ll,ll>
#define maxheap priority_queue<ll>
#define minheap priority_queue<ll,vector<ll>,greater<ll>>
#pragma pack(1)
const ll INF=1e18;
const double PI=4*atan(1);
const double eps=1e-8;
 
#define SpeedForce               \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                    \
    cout.tie(0);
 
//using namespace __gnu_pbds;
using namespace std;
//typedef tree<int,null_type,less<int>,rb_tree_tag,
//tree_order_statistics_node_update> indexed_set;

int dx[]={-1,0,1,0,-1,1,1,-1};
int dy[]={0,1,0,-1,1,1,-1,-1};

int myxor(int a,int b){
    return ((a|b)&(~a|~b));
}

ll max(ll a,ll b){
    if(a>=b) return a;
    return b;
}

ll min(ll a,ll b){
    if(a<=b) return a;
    return b;
}
 
void solve(){  
    ll n,m,t;
    cin >> n >> m >> t;
    ll ans=n;
    ll a[m],b[m];
    bool f=0;
    for(int i=0;i<m;i++){
        cin >> a[i] >> b[i];
        if(i==0){
            ans-=a[i];
            ans=max(ans,0);
            if(ans<=0) f=1;
            ans+=min(n,(b[i]-a[i]));
            ans=min(ans,n); 
        }
        else{
            ans-=(a[i]-b[i-1]);
            ans=max(ans,0);
            if(ans<=0) f=1;
            ans+=min(n,(b[i]-a[i]));
            ans=min(ans,n);
        }
    }

    ans-=(t-b[m-1]);
    if(ans<=0) f=1;
    if(f){
        cout << "No";
    }
    else cout << "Yes";

}
 
int32_t main(){
    SpeedForce
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
 
    int t;
    t=1;
    //cin >> t;
    cerr << endl;
    int cnt=1;
    while (t--){
       // cout << "Case #" << cnt << ": ";
        //cout << fixed << setprecision(6);
        solve();
        cnt++;
    }
    cerr << "Time : " << 1000*((double)clock())/ (double)CLOCKS_PER_SEC << "ms" << endl;
}