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1 10 10
2 4
2 8
2 6
1 17
1 9
1 15
2 10
1 11
2 2
1 13
 10 10 10
9 17
9 13
8 10
12 2
18 14
18 6
10 6
13 19
2 12
10 8
 10 10 10
2 6
5 9
5 15
1 19
6 6
8 4
11 9
13 11
4 6
10 2
 10 10 10
16 2
12 6
8 2
12 2
3 15
6 6
7 17
4 16
11 9
2 6
 10 10 10
18 2
15 13
9 19
6 10
20 18
15 19
2 2
11 13
17 13
3 15
 1 2 1
2 2
 1 10 10
2 4
1 13
1 7
2 14
1 19
1 17
2 2
1 15
1 11
2 6
 1 10 10
1 13
2 4
1 5
2 2
1 19
1 11
1 15
1 17
1 7
2 14
 1 10 10
1 17
2 4
2 2
1 11
1 15
1 19
2 6
2 8
2 12
1 13

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
 YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
 YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
 YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
 YES
NO
YES
YES
YES
NO
YES
NO
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
 YES
NO
YES
YES
YES
YES
YES
NO
NO
NO
NO
YES
YES
NO
NO
NO
YES
YES
YES
NO
 YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
 YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
 YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
 YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
 YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
 YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
 YES
NO
 YES
NO
NO
YES
YES
NO
YES
YES
NO
NO
NO
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
NO
NO
NO
YES
NO
NO
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
 YES
YES
 YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
 YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
 YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
YES
NO
YES
NO
YES
NO
YES
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
NO
NO
NO
NO
YES
YES
YES
NO
YES
NO
NO
NO
YES
YES
YES
 YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
YES
NO
YES
 YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
 YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
 YES
YES
NO
NO
YES
YES
NO
YES
YES
NO
 YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
 YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
 YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
 YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
 YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
 YES
 YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
 YES
YES
NO
NO
YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
 YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
 YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
 YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
 YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
 YES
 YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
 YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
 YES
YES
YES
YES
YES
YES
YES
YES
NO
NO

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);cerr.tie(0)
#define mp make_pair
#define xx first
#define yy second
#define dif(x) ((x).yy-(x).xx)
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define all(x) (x).begin(),(x).end()
#define ub(a,x) upper_bound(all(a),x)
#define lb(a,x) lower_bound(all(a),x)
#define inv(n) power((n), mod - 2)
#define ff(i,a,b) for (int (i) = (a); (i) < (b); (i)++)
#define fff(i,a,b) for (int (i) = (a); (i) <= b; (i)++)
#define bff(i,a,b) for (int (i) = (b)-1; (i) >= (a); (i)--)
#define bfff(i,a,b) for (int (i) = (b); (i) >= (a); (i)--)
#define sum_overflow(a,b) __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
#define mul_overflow(a,b) __builtin_mul_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)

using namespace std;
long double typedef ld;
unsigned int typedef ui;
long long int typedef li;
pair<int,int> typedef pii;
pair<li,li> typedef pli;
pair<ld,ld> typedef pld;
vector<vector<int>> typedef graph;
unsigned long long int typedef ull;
const ld PI = 3.14159265359;
//const int mod = 998244353;
const int mod = 1000000007;
const li inf = ((1ll<<63)-1-(1ll<<31));

using namespace __gnu_pbds;
template <class T> using oset = tree<T, null_type,greater<T>, rb_tree_tag,tree_order_statistics_node_update>;
template <class T> using omset = tree<T, null_type,less_equal<T>, rb_tree_tag,tree_order_statistics_node_update>;

inline int power(li _a, int _n)
{
        li _c = 1;
        while (_n>0)
        {
                if (_n % 2) _c = _c * _a%mod;
                _a = _a * _a%mod;
                _n/=2;
        }
        return _c;
}

inline int geom(li _a, int _n) //suma 1 + a + a^2 + ... + a^(n-1)
{
    if (_a == 0) return 0;
        if (_a == 1) return _n;
        return ((li)power(_a, _n) - 1) * inv(_a - 1) % mod;
}

pli _r;

li bigmod(li _a, li _b, li _m) //ogromni mod
{
    if (_a==0) return 0;
    if (_a%2==1) return (_b + 2*bigmod(_a/2,_b,_m))%_m;
    return 2*bigmod(_a/2,_b,_m)%_m;
}

void euklid(li _a, li _b) //resava ax+by=1. a i b MORAJU biti POZITIVNI (analogno se nalaze resenja za negativne...)
{
    if (_b==1)
    {
        _r = mp(1,-_a+1);
        return;
    }

    euklid(_b,_a%_b); //cout<<r.xx<<" "<<r.yy<<endl;
    _r=mp(_r.yy,_r.xx-_r.yy*(_a/_b));
}

li kinez(li _x, li _a, li _y, li _b) //moze vratiti negativan ostatak
{
    if (_x==_y) return _x;
    if (_a>_b) {swap(_a,_b); swap(_x,_y);}

    euklid(_b,_a); (_r.xx*=(_x-_y))%=(_a*_b);
    return (bigmod(_b,_r.xx,_a*_b)+_y)%(_a*_b);
}

inline li sum(int _n) {return ((li)_n*(_n+1))/2;}

inline li kv(int _n) {return ((li)_n*(_n+1)*(2*_n+1))/6;}







//Note to self: Check for overflow

class segTree
{
public:
    struct node
    {
        int h; //visina
        int a,b,c,d; //[a,b] i [c,d]
        int c0,c1,c2,c3,P;
        int val=0;
    };

    map<pair<pii,pii>,int> dje;
    vector<node> seg;

    segTree(int n, int m)
    {
        seg.pb({0,0,0,0,0,0,0,0,0,0,0});
        int k=1; n=max(m,n); while (k<n) k*=2;
        seg.pb({0,0,k-1,0,k-1,0,0,0,0,0,0});
        dje[mp(mp(0,k-1),mp(0,k-1))]=1;
    }

    void Upd(int p,int x)
    {
        while (p)
        {
            seg[p].val+=x;
            p=seg[p].P;
        }
    }

    bool erect(int y, int x)
    {
        int gde=dje[mp(mp(y,y),mp(x,x))];
        if (gde)
        {
            Upd(gde,1-(seg[gde].val)*2);
            return true;
        }

        int it=seg.size();
        seg.pb({0,y,y,x,x,0,0,0,0,0,1});

        while(true)
        {
            dje[mp(mp(seg[it].a,seg[it].b),mp(seg[it].c,seg[it].d))]=it;
            int A=seg[it].a-(seg[it].a&(1<<(seg[it].h))),B=A+(1<<(seg[it].h+1))-1;
            int C=seg[it].c-(seg[it].c&(1<<(seg[it].h))),D=C+(1<<(seg[it].h+1))-1;
            seg[it].P=dje[mp(mp(A,B),mp(C,D))];

            /*cout<<"["<<it->a<<","<<it->b<<"] : ["<<it->c<<","<<it->d<<"]"<<endl;
            cout<<"["<<A<<","<<B<<"] : ["<<C<<","<<D<<"]"<<endl<<endl;*/

            int type=0;
            if (seg[it].a&(1<<(seg[it].h))) type++;
            if (seg[it].c&(1<<(seg[it].h))) type+=2;

            if (seg[it].P==0)
            {
                seg.pb({seg[it].h+1,A,B,C,D,0,0,0,0,0,1});
                int nxt=seg.size()-1; seg[it].P=nxt;

                if (type==0) seg[nxt].c0=it;
                else if (type==1) seg[nxt].c1=it;
                else if (type==2) seg[nxt].c2=it;
                else seg[nxt].c3=it; it=nxt++;
            }
            else
            {
                if (type==0) seg[seg[it].P].c0=it;
                else if (type==1) seg[seg[it].P].c1=it;
                else if (type==2) seg[seg[it].P].c2=it;
                else seg[seg[it].P].c3=it; Upd(seg[it].P,1); break;
            }
        }

        return false;
    }

    int Sum(int p, int A, int B, int C, int D)
    {
        if (p==0) return 0;
        //cout<<"bruh...       ["<<p->a<<","<<p->b<<"] : ["<<p->c<<","<<p->d<<"] = "<<p->val<<endl;
        //cout<<"udjem ovde    ["<<A<<","<<B<<"] : ["<<C<<","<<D<<"] = "<<p->val<<endl<<endl;
        if ((seg[p].a>B||seg[p].b<A)&&(seg[p].c>D||seg[p].d<C)) return 0;
        if (seg[p].a>=A && seg[p].b<=B && seg[p].c>=C && seg[p].d<=D) return seg[p].val;
        return Sum(seg[p].c0,A,B,C,D)+Sum(seg[p].c1,A,B,C,D)+Sum(seg[p].c2,A,B,C,D)+Sum(seg[p].c3,A,B,C,D);
    }

    /*void ispisi(node *p)
    {
        if (!p) return;
        cout<<seg[p].h<<": ["<<seg[p].a<<","<<seg[p].b<<"] : ["<<seg[p].c<<","<<seg[p].d<<"] = "<<seg[p].val<<endl;
        ispisi(seg[p].c0); ispisi(seg[p].c1); ispisi(seg[p].c2); ispisi(seg[p].c3);
    }*/
};

int main()
{
    li badness=0;
    int n,m,q; scanf("%d%d%d",&n,&m,&q);
    segTree A(n,m); segTree B(n,m);
    while (q--)
    {
        int y,x; scanf("%d%d",&y,&x);
        y--; x--;

        if (y&1)
        {
            int k=A.Sum(1,0,y/2,0,x/2);
            badness+=(B.erect(y/2,x/2)?k:-k);
        }
        else
        {
            int k=B.Sum(1,y/2,n-1,x/2,m-1);
            badness+=(A.erect(y/2,x/2)?k:-k);
        }

        //A.ispisi(A.top); cout<<endl;
        //B.ispisi(B.top); cout<<endl;

        //cout<<badness<<endl;
        puts(badness?"NO":"YES");
        
        if (q==195000) return cout<<"jebote",0;
    }
    //A.ispisi(A.top);

    /*int n,m; cin>>n>>m;
    segTree drvo(n,m);

    while (true)
    {
        int t; cin>>t;
        if (t==1)
        {
            int y,x; cin>>y>>x;
            drvo.erect(y-1,x-1);
        }
        else if (t==2)
        {
            int a,b,c,d; cin>>a>>b>>c>>d;
            drvo.ispisi(drvo.top);
            cout<<drvo.Sum(drvo.top,a-1,b-1,c-1,d-1)<<endl;
        }
    }*/
}

//Note to self: Check for overflow

/*

2 2 4
1 1
1 2
2 1
2 2

4 4 4
1 1
2 2
3 3
4 4

//////////////////////

4 4
1 1 1
1 2 2
2 2 3 2 3

*/
