#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 100;
int n, m, Q, u[N], v[N], pos[N], dfn;
int tl, tr;
namespace dsu {
struct node {
  int t, u, v, lastsz, lastd, preok;
};
stack<node> s;
int fa[N], sz[N], d[N];
bool ok;
inline void init() {
  while (!s.empty()) s.pop();
  dfn = 0;
  ok = 1;
  for (int i = 1; i <= n; i++) fa[i] = i, sz[i] = 1, d[i] = 0;
}
inline int nowtime() {
  if (s.empty())
    return 0;
  else
    return s.top().t;
}
int find(int x, int &s) {
  if (fa[x] == x) return x;
  s = ((s + d[x]) & 1);
  return find(fa[x], s);
}
inline void connect(int x, int y) {
  if (x == 0 && y == 0) return;
  dfn++;
  int fax, fay, sx = 0, sy = 0;
  fax = find(x, sx);
  fay = find(y, sy);
  if (sz[fax] > sz[fay]) swap(fax, fay), swap(x, y), swap(sx, sy);
  if (fax == fay) {
    if ((sx + sy + 1) & 1) {
      s.push((node){dfn, fax, fay, sz[fay], d[fax], ok});
      ok = 0;
    }
    return;
  }
  s.push((node){dfn, fax, fay, sz[fay], d[fax], ok});
  d[fax] = (sx + sy + 1) % 2;
  sz[fay] += sz[fax];
  fa[fax] = fay;
}
inline void back(int ti) {
  while (nowtime() > ti) {
    node now = s.top();
    s.pop();
    d[now.u] = now.lastd;
    sz[now.v] = now.lastsz;
    fa[now.u] = now.u;
    ok = now.preok;
  }
  dfn = ti;
}
}  // namespace dsu
void solve(int l, int r, int L, int R) {
  if (L > R) return;
  int st = dsu::nowtime();
  while (tl <= L) dsu::connect(u[tl], v[tl]), tl++;
  while (tr > r) dsu::connect(u[tr], v[tr]), tr--;
  int now = dsu::nowtime();
  int mid = (L + R) >> 1;
  while (tl <= mid) dsu::connect(u[tl], v[tl]), tl++;
  while (tr > mid) {
    dsu::connect(u[tr], v[tr]);
    if (!dsu::ok) break;
    tr--;
  }
  pos[mid] = tr + 1;
  dsu::back(now);
  tl = L + 1, tr = r;
  solve(l, pos[mid], L, mid - 1);
  dsu::back(now);
  tl = L + 1, tr = r;
  solve(pos[mid], r, mid + 1, R);
  dsu::back(st);
}
signed main() {
  scanf("%d%d%d", &n, &m, &Q);
  for (int i = 1; i <= m; i++) scanf("%d%d", &u[i], &v[i]);
  u[m + 1] = v[m + 1] = 0;
  int wh = m;
  dsu::init();
  for (int i = 1; i <= m; i++) {
    dsu::connect(u[i], v[i]);
    if (!dsu::ok) {
      wh = i - 1;
      for (int j = i; j <= m; j++) pos[j] = m + 2;
      break;
    }
  }
  dsu::init();
  tl = 1;
  tr = m;
  solve(1, m + 1, 0, wh);
  while (Q--) {
    int l, r;
    scanf("%d%d", &l, &r);
    if (r + 1 >= pos[l - 1])
      printf("NO\n");
    else
      printf("YES\n");
  }
}
