#include <bits/stdc++.h>
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
using namespace std;
int n, m, q, a[4000005], fa[4000005], ch[4000005][2], lzy[4000005], mx[4000005],
    siz[4000005];
inline bool isroot(int x) {
  return !((ch[fa[x]][0] == x) | (ch[fa[x]][1] == x));
}
inline int chk(int x) { return ch[fa[x]][1] == x; }
inline void pushup(int x) {
  mx[x] = x;
  if (a[mx[x]] > a[mx[ch[x][0]]] && ch[x][0]) mx[x] = mx[ch[x][0]];
  if (a[mx[x]] > a[mx[ch[x][1]]] && ch[x][1]) mx[x] = mx[ch[x][1]];
  siz[x] = siz[ch[x][0]] + siz[ch[x][1]] + 1;
}
inline void rev(int x) { swap(ch[x][0], ch[x][1]), lzy[x] ^= 1; }
inline void pushdown(int x) {
  if (lzy[x]) rev(ch[x][0]), rev(ch[x][1]), lzy[x] = 0;
}
inline void update(int x) {
  if (!isroot(x)) update(fa[x]);
  pushdown(x);
}
inline void rotate(int x) {
  int y = fa[x], z = fa[y], k = chk(x);
  if (!isroot(y)) ch[z][chk(y)] = x;
  ch[y][k] = ch[x][!k];
  ch[x][!k] = y;
  fa[x] = z, fa[y] = x;
  if (ch[y][k]) fa[ch[y][k]] = y;
  pushup(y), pushup(x);
}
inline void splay(int x) {
  update(x);
  for (int f = fa[x]; !isroot(x); rotate(x), f = fa[x])
    if (!isroot(f)) rotate((chk(x) == chk(f)) ? f : x);
  pushup(x);
}
inline void access(int x) {
  for (int p = 0; x; p = x, x = fa[p]) splay(x), ch[x][1] = p, pushup(x);
}
inline void mt(int x) { access(x), splay(x), rev(x); }
inline void split(int x, int y) { mt(x), access(y), splay(y); }
inline int findroot(int x) {
  access(x), splay(x);
  while (ch[x][0]) pushdown(x), x = ch[x][0];
  splay(x);
  return x;
}
inline void add(int x, int y) {
  mt(x);
  if (findroot(y) != x) fa[x] = y;
}
inline void cut(int x, int y) { split(x, y), fa[x] = 0, ch[y][0] = 0; }
struct nod {
  int u, v;
} seg[4000005];
int tot, b[4000005], vis[4000005], dy[4000005];
inline bool check(int p) {
  int x = seg[p].u, y = seg[p].v;
  mt(x);
  if (findroot(y) == x) {
    split(x, y);
    if (((siz[y] + 1) / 2) % 2 == 1 && siz[y] > 1) return 0;
    int tmp = mx[y], id = dy[tmp];
    cut(tmp, seg[id].u), cut(tmp, seg[id].v);
    vis[id] = 0;
  }
  vis[p] = ++tot;
  dy[tot] = p;
  siz[tot] = 1;
  a[tot] = p;
  mx[tot] = tot;
  add(tot, x), add(tot, y);
  return 1;
}
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int main() {
  n = read(), m = read(), q = read();
  tot = n;
  for (int i = 1; i <= n; i++) a[i] = 1 << 30, mx[i] = i, siz[i] = 1;
  for (int i = 1; i <= m; i++)
    seg[i].u = read(), seg[i].v = read(), seg[i + m] = seg[i];
  int r = 0;
  ;
  for (int i = 1; i <= m * 2; i++) {
    if (i > m + 1) break;
    while (r < m * 2 && check(r + 1)) r++;
    b[i] = r;
    if (vis[i]) cut(seg[i].u, vis[i]), cut(seg[i].v, vis[i]), vis[i] = 0;
  }
  for (int i = 1, l, r; i <= q; i++) {
    l = read(), r = read();
    if (b[r + 1] < l - 1 + m)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
