#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
struct Ask {
  int x, y, ans;
} A[N << 1];
int f[N], num[N], tot, size[N], n, x[N], y[N], m, Q, ans[N];
int find1(int x) {
  if (x == f[x]) return x;
  return find1(f[x]);
}
int find2(int x) {
  if (x == f[x]) return 0;
  return find2(f[x]) ^ num[x];
}
void add(int x, int y) {
  int xx = find1(x), yy = find1(y);
  tot++;
  if (size[xx] > size[yy]) swap(xx, yy), swap(x, y);
  if (xx == yy) {
    A[tot].x = A[tot].y = 0;
    A[tot].ans = A[tot - 1].ans | ((find2(x) ^ find2(y)) == 0);
    return;
  }
  A[tot].x = xx;
  A[tot].y = yy;
  A[tot].ans = A[tot - 1].ans;
  num[xx] = find2(x) ^ find2(y) ^ 1;
  f[xx] = yy;
  size[yy] += size[xx];
}
void back() {
  if (A[tot].x) {
    num[A[tot].x] = 0;
    size[A[tot].y] -= size[A[tot].x];
    f[A[tot].x] = A[tot].x;
  }
  tot--;
}
void solve(int l, int r, int L, int R) {
  if (l > r) return;
  int mid = (l + r) / 2;
  for (int i = max(l, 1); i <= mid; i++) add(x[i], y[i]);
  if (A[tot].ans) {
    for (int i = mid; i <= r; i++) ans[i] = 1e9;
    for (int i = max(1, l); i <= mid; i++) back();
    solve(l, mid - 1, L, R);
    return;
  }
  int id = L - 1;
  for (int i = R; i >= L; i--) {
    add(x[i], y[i]);
    if (A[tot].ans) {
      id = i;
      break;
    }
  }
  ans[mid] = id + 1;
  for (int i = max(L, id); i <= R; i++) back();
  solve(mid + 1, r, id + 1, R);
  for (int i = mid; i >= max(l, 1); i--) back();
  for (int i = R; i >= max(L, id + 1); i--) add(x[i], y[i]);
  solve(l, mid - 1, L, id);
  for (int i = max(L, id + 1); i <= R; i++) back();
}
int main() {
  scanf("%d%d%d", &n, &m, &Q);
  for (int i = 1; i <= n; i++) f[i] = i, size[i] = 1;
  for (int i = 1; i <= m; i++) scanf("%d%d", &x[i], &y[i]), add(x[i], y[i]);
  if (!A[tot].ans) {
    while (Q--) puts("NO");
    return 0;
  }
  for (int i = 1; i <= m; i++) back();
  solve(0, m, 1, m);
  while (Q--) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (ans[x - 1] <= y + 1)
      puts("NO");
    else
      puts("YES");
  }
}
