#include <bits/stdc++.h>
using namespace std;
int n, m, Q, i, j, k, l, x, y, q1, q2;
int tr[800001][4], tra[800001], fa[800001], num[800001], len;
bool rt[800001], rev[800001];
int A[200001][2];
int Ans[200001], ans;
void New(int s) {
  ++len;
  tra[len] = tr[len][2] = s;
  tr[len][3] = 1;
  rt[len] = 1;
}
void swap(int &x, int &y) {
  int z = x;
  x = y;
  y = z;
}
void down(int t) {
  if (rev[t]) {
    swap(tr[t][0], tr[t][1]);
    rev[tr[t][0]] ^= 1, rev[tr[t][1]] ^= 1;
    rev[t] = 0;
  }
}
void up(int t) {
  tr[t][2] = ((tr[tr[t][0]][2] < tr[tr[t][1]][2] ? tr[tr[t][0]][2]
                                                 : tr[tr[t][1]][2]) < tra[t]
                  ? (tr[tr[t][0]][2] < tr[tr[t][1]][2] ? tr[tr[t][0]][2]
                                                       : tr[tr[t][1]][2])
                  : tra[t]),
  tr[t][3] = tr[tr[t][0]][3] + tr[tr[t][1]][3] + 1;
}
void rot(int t) {
  down(fa[fa[t]]), down(fa[t]), down(t);
  int Fa = fa[t], Fa2 = fa[Fa], x = tr[Fa][1] == t, x2 = tr[Fa2][1] == Fa,
      son = tr[t][x ^ 1];
  fa[t] = Fa2;
  if (tr[Fa2][x2] == Fa) tr[Fa2][x2] = t;
  fa[Fa] = t, tr[t][x ^ 1] = Fa;
  fa[son] = Fa, tr[Fa][x] = son;
  up(Fa), up(t);
  if (rt[Fa]) rt[t] = 1, rt[Fa] = 0;
}
void splay(int t) {
  int Fa, Fa2;
  down(t);
  while (!rt[t]) {
    Fa = fa[t], Fa2 = fa[Fa];
    if (rt[Fa])
      rot(t);
    else {
      if ((tr[Fa2][0] == Fa) ^ (tr[Fa][0] == t))
        rot(t), rot(t);
      else
        rot(Fa), rot(t);
    }
  }
}
void access(int t) {
  int x, ls = 0;
  while (t) {
    splay(t);
    x = tr[t][1];
    rt[x] = 1;
    tr[t][1] = 0;
    tr[t][1] = ls, rt[ls] = 0;
    up(t);
    ls = t, t = fa[t];
  }
}
int getroot(int t) {
  while (fa[t]) t = fa[t];
  return t;
}
void makeroot(int t) {
  access(t), splay(t);
  rev[t] ^= 1, down(t);
}
void link(int x, int y) {
  makeroot(x), makeroot(y);
  fa[x] = y;
}
void del(int x, int y) {
  makeroot(y), access(x);
  splay(x);
  down(x);
  tr[x][0] = 0, rt[y] = 1, fa[y] = 0, up(x);
}
void query(int x, int y) {
  makeroot(x);
  access(y), splay(y);
  q1 = tr[y][2], q2 = tr[y][3];
}
void test() {
  n = 7;
  tr[0][2] = 2147483647;
  for (i = 1; i <= n; i++) rt[i] = 1, tr[i][2] = tra[i] = i, tr[i][3] = 1;
  link(1, 2), link(1, 3);
  link(2, 4), link(2, 5);
  link(3, 6), link(3, 7);
  query(5, 4);
  exit(0);
}
int main() {
  scanf("%d%d%d", &n, &m, &Q);
  for (i = 1; i <= m; i++) scanf("%d%d", &x, &y), A[i][0] = x, A[i][1] = y;
  tr[0][2] = 2147483647;
  len = n;
  for (i = 1; i <= n; i++)
    rt[i] = 1, tra[i] = tr[i][2] = 2147483647, tr[i][3] = 1;
  for (i = m; i >= 1; i--) {
    x = A[i][0], y = A[i][1];
    if (getroot(x) != getroot(y))
      New(i), num[i] = len, link(x, len), link(y, len);
    else {
      query(x, y);
      if (!((q2 / 2) & 1)) break;
    }
  }
  ans = i + 1;
  Ans[0] = ans;
  for (i = 1; i <= m; i++) {
    x = A[i][0], y = A[i][1];
    if (getroot(x) != getroot(y))
      New(2147483647), link(x, len), link(y, len);
    else {
      query(x, y);
      if (q1 == 2147483647) {
        if (!((q2 / 2) & 1)) break;
      } else {
        if (!((q2 / 2) & 1)) ans = (ans > q1 + 1 ? ans : q1 + 1);
        del(num[q1], A[q1][0]), del(num[q1], A[q1][1]);
        New(2147483647), link(x, len), link(y, len);
      }
    }
    Ans[i] = ans;
  }
  for (j = i; j <= m; j++) Ans[j] = 2147483647;
  for (; Q; --Q) {
    scanf("%d%d", &x, &y);
    --x, ++y;
    printf(Ans[x] <= y ? "NO\n" : "YES\n");
  }
  fclose(stdin);
  fclose(stdout);
  return 0;
}
