#include <bits/stdc++.h>
using namespace std;
int read();
long long readll();
int n, m, cnt, a[600009], b[600009], c[600009][2], fa[600009], sz[600009],
    val[600009], mx[600009], q[600009], f[600009];
bool rev[600009];
set<int> S;
bool isrt(int x) { return c[fa[x]][0] != x && c[fa[x]][1] != x; }
void maintain(int x) {
  sz[x] = sz[c[x][0]] + sz[c[x][1]] + (x <= n);
  mx[x] = max(val[x], max(mx[c[x][0]], mx[c[x][1]]));
}
void pushdn(int x) {
  if (rev[x]) {
    swap(c[x][0], c[x][1]);
    rev[c[x][0]] ^= 1;
    rev[c[x][1]] ^= 1;
    rev[x] = 0;
  }
}
void rot(int x) {
  int y = fa[x], z = fa[y], l = (c[y][1] == x), r = l ^ 1;
  if (!isrt(y)) c[z][c[z][1] == y] = x;
  fa[x] = z;
  fa[y] = x;
  fa[c[x][r]] = y;
  c[y][l] = c[x][r];
  c[x][r] = y;
  maintain(y);
}
void splay(int x) {
  int i, y, tp;
  q[tp = 1] = x;
  for (i = x; !isrt(i); i = fa[i]) q[++tp] = fa[i];
  while (tp) pushdn(q[tp--]);
  for (; !isrt(x); rot(x))
    if (!isrt(y = fa[x])) rot(((c[y][0] == x) ^ (c[fa[y]][0] == y)) ? x : y);
  maintain(x);
}
void acss(int x) {
  int y = 0;
  for (; x; y = x, x = fa[x]) {
    splay(x);
    c[x][1] = y;
    maintain(x);
  }
}
void makert(int x) {
  acss(x);
  splay(x);
  rev[x] ^= 1;
}
void pick(int x, int y) {
  makert(x);
  acss(y);
  splay(y);
}
void link(int x, int y) {
  makert(x);
  fa[x] = y;
}
void cut(int x, int y) {
  pick(x, y);
  c[y][0] = fa[x] = 0;
  maintain(y);
}
int findrt(int x) {
  for (; pushdn(x), c[x][0]; x = c[x][0])
    ;
  return x;
}
bool ok(int k) {
  pick(a[k], b[k]);
  return sz[b[k]] & 1 ^ 1;
}
int main() {
  n = read();
  m = read();
  cnt = read();
  int i, j, k, t, x, y;
  for (i = 1; i <= m; i++) {
    a[i] = a[i + m] = read();
    b[i] = b[i + m] = read();
  }
  for (i = 1; i <= (m << 1); i++) val[i + n] = i;
  for (j = m + 1; j <= (m << 1); j++) {
    x = a[j];
    y = b[j];
    pick(x, y);
    if (findrt(y) != x) {
      link(x, j + n);
      link(y, j + n);
      S.insert(j);
    } else if (sz[y] & 1)
      break;
  }
  j--;
  f[m + 1] = j;
  for (i = m; i && j >= m; i--) {
    x = a[i];
    y = b[i];
    pick(x, y);
    if (findrt(y) != x) {
      link(x, i + n);
      link(y, i + n);
      S.insert(i);
    } else {
      k = mx[y];
      t = sz[y];
      cut(a[k], k + n);
      cut(b[k], k + n);
      S.erase(k);
      link(x, i + n);
      link(y, i + n);
      S.insert(i);
      if (t & 1) {
        for (; (*S.rbegin()) > k; S.erase(*S.rbegin()))
          ;
        for (j = *S.rbegin(); ok(j + 1); j++)
          ;
      }
    }
    f[i] = j;
  }
  while (cnt--) {
    x = read();
    y = read();
    puts(f[y + 1] >= x + m - 1 ? "NO" : "YES");
  }
  return 0;
}
int read() {
  int x = 0;
  char ch = getchar();
  bool flag = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') flag = 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return flag ? -x : x;
}
long long readll() {
  long long x = 0;
  char ch = getchar();
  bool flag = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') flag = 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return flag ? -x : x;
}
