#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  int v = 0, f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void read(long long &x) {
  long long v = 0ll, f = 1ll;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void readc(char &x) {
  char c;
  while (((c = getchar()) == ' ') || c == '\n')
    ;
  x = c;
}
int n, m, q, i, j, res[200005], vis[200005];
int fa[400005], lc[400005], rc[400005], mi[400005], miv[400005], val[400005],
    rev[400005], sz[400005];
int px[200005], py[200005];
bool isrt(int x) { return lc[fa[x]] != x && rc[fa[x]] != x; }
void pushup(int x) {
  miv[x] = val[x];
  mi[x] = x;
  sz[x] = (x <= n);
  if (lc[x]) {
    sz[x] += sz[lc[x]];
    if (miv[lc[x]] < miv[x]) {
      miv[x] = miv[lc[x]];
      mi[x] = mi[lc[x]];
    }
  }
  if (rc[x]) {
    sz[x] += sz[rc[x]];
    if (miv[rc[x]] < miv[x]) {
      miv[x] = miv[rc[x]];
      mi[x] = mi[rc[x]];
    }
  }
}
void upd(int x) {
  swap(lc[x], rc[x]);
  rev[x] ^= 1;
}
void pushdo(int x) {
  if (rev[x]) {
    if (lc[x]) upd(lc[x]);
    if (rc[x]) upd(rc[x]);
    rev[x] = 0;
  }
}
void pushall(int x) {
  if (!isrt(x)) pushall(fa[x]);
  pushdo(x);
}
void rot(int x) {
  int y = fa[x], z = fa[y];
  if (!isrt(y)) {
    if (lc[z] == y)
      lc[z] = x;
    else
      rc[z] = x;
  }
  fa[x] = z;
  fa[y] = x;
  if (lc[y] == x) {
    if (lc[y] = rc[x] + 0) fa[lc[y]] = y;
    rc[x] = y;
  } else {
    if (rc[y] = lc[x] + 0) fa[rc[y]] = y;
    lc[x] = y;
  }
  pushup(y);
  pushup(x);
}
void splay(int x) {
  pushall(x);
  while (!isrt(x)) {
    int y = fa[x];
    if (!isrt(y)) {
      int z = fa[y];
      if ((lc[z] == y) == (lc[y] == x))
        rot(y);
      else
        rot(x);
    }
    rot(x);
  }
}
void access(int x) {
  int y = 0;
  while (x) {
    splay(x);
    rc[x] = y;
    pushup(x);
    y = x;
    x = fa[x];
  }
}
void mkrt(int x) {
  access(x);
  splay(x);
  upd(x);
}
int fdrt(int x) {
  access(x);
  splay(x);
  while (lc[x]) {
    pushdo(x);
    x = lc[x];
  }
  return x;
}
void link(int x, int y) {
  mkrt(x);
  fa[x] = y;
}
void cut(int x, int y) {
  mkrt(x);
  access(y);
  splay(y);
  lc[y] = 0;
  fa[x] = 0;
  pushup(y);
}
void del(int x) {
  vis[x] = 0;
  cut(x + n, px[x]);
  cut(x + n, py[x]);
}
int ins(int x) {
  int res = -1;
  miv[x + n] = val[x + n] = 0x3bbbbbbb;
  mi[x + n] = x + n;
  lc[x + n] = rc[x + n] = fa[x + n] = sz[x + n] = 0;
  if (fdrt(px[x]) == fdrt(py[x])) {
    mkrt(px[x]);
    access(py[x]);
    splay(py[x]);
    if (sz[py[x]] & 1) res = miv[py[x]];
    del(mi[py[x]] - n);
  }
  vis[x] = 1;
  link(px[x], x + n);
  link(py[x], x + n);
  return res;
}
int main() {
  read(n);
  read(m);
  read(q);
  for (((i)) = (1); ((i)) <= ((m)); ((i))++) {
    read(px[i]);
    read(py[i]);
  }
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    miv[i] = val[i] = 0x3bbbbbbb + 1;
    sz[i] = 1;
  }
  int lst = -1;
  for (((i)) = (1); ((i)) <= ((m)); ((i))++) {
    mi[i + n] = i + n;
    miv[i] = val[i + n] = i;
  }
  for (((i)) = ((m)); ((i)) >= (1); ((i))--) {
    if (fdrt(px[i]) != fdrt(py[i])) {
      vis[i] = 1;
      link(px[i], i + n);
      link(py[i], i + n);
    } else {
      mkrt(px[i]);
      access(py[i]);
      splay(py[i]);
      if (sz[py[i]] & 1) {
        lst = i;
        break;
      }
    }
  }
  if (lst == -1) {
    while (q--) {
      puts("NO");
    }
    return 0;
  }
  int cur = i;
  j = 1;
  for (; i <= m; i++) {
    if (vis[i]) {
      del(i);
    }
    while (cur <= i) {
      cur = max(cur, ins(j++));
    }
    res[i] = j;
  }
  while (q--) {
    int l, r;
    read(l);
    read(r);
    if (r < lst || l >= res[r]) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
  return 0;
}
