#include <bits/stdc++.h>
using namespace std;
bool bipartite;
vector<int> par;
vector<int> pard;
vector<int> rankk;
vector<bool> undo_bipartite;
vector<int> undo_par;
vector<int> undo_rankk;
pair<int, int> find(int i) {
  int d = 0;
  while (par[i] != -1) {
    d ^= pard[i];
    i = par[i];
  }
  return {i, d};
}
void merge(int i1, int i2) {
  int d1, d2;
  tie(i1, d1) = find(i1);
  tie(i2, d2) = find(i2);
  undo_bipartite.push_back(bipartite);
  if (i1 == i2) {
    if ((d1 ^ d2) != 1) bipartite = false;
    undo_par.push_back(-1);
    undo_rankk.push_back(-1);
  } else {
    if (rankk[i1] > rankk[i2]) swap(i1, i2);
    par[i1] = i2;
    pard[i1] = d1 ^ d2 ^ 1;
    undo_par.push_back(i1);
    if (rankk[i1] < rankk[i2]) {
      undo_rankk.push_back(-1);
    } else {
      rankk[i2]++;
      undo_rankk.push_back(i2);
    }
  }
}
void undo() {
  bipartite = undo_bipartite.back();
  undo_bipartite.pop_back();
  if (undo_par.back() != -1) par[undo_par.back()] = -1;
  undo_par.pop_back();
  if (undo_rankk.back() != -1) rankk[undo_rankk.back()]--;
  undo_rankk.pop_back();
}
int N, M, Q;
vector<pair<int, int> > str;
void merge(int m) { merge(str[m].first, str[m].second); }
struct grp {
  int t;
  grp() : t(undo_bipartite.size()) {}
  ~grp() {
    while ((int)undo_bipartite.size() > t) undo();
  }
};
vector<int> bla;
void compute(int l1, int l2, int r1, int r2) {
  int lm = (l1 + l2) / 2;
  int rm = r2 - 1;
  {
    grp G;
    for (int m = (l1); m < (lm); m++) merge(m);
    while (bipartite && rm >= r1) {
      merge(rm);
      rm--;
    }
    if (!bipartite) {
      undo();
      rm += 2;
    } else {
      rm += 1;
    }
    bla[lm] = rm;
  }
  if (l1 <= lm - 1) {
    grp G;
    for (int m = (rm); m < (r2); m++) merge(m);
    compute(l1, lm - 1, r1, rm);
  }
  if (lm + 1 <= l2) {
    grp G;
    for (int m = (l1); m < (lm + 1); m++) merge(m);
    compute(lm + 1, l2, rm, r2);
  }
}
int main() {
  scanf("%d%d%d", &N, &M, &Q);
  bipartite = true;
  par.assign(N, -1);
  pard.resize(N);
  rankk.assign(N, 0);
  for (int m = (0); m < (M); m++) {
    int i, j;
    scanf("%d%d", &i, &j);
    i--;
    j--;
    str.emplace_back(i, j);
  }
  int L = 0;
  {
    grp G;
    while (bipartite && L < M) {
      merge(L);
      L++;
    }
    if (!bipartite) {
      undo();
      L--;
    }
  }
  bla.resize(L + 1);
  compute(0, L, 0, M);
  for (int q = (0); q < (Q); q++) {
    int l, r;
    scanf("%d%d", &l, &r);
    l--;
    r--;
    if (l <= L && bla[l] <= r + 1)
      printf("NO\n");
    else
      printf("YES\n");
  }
  return 0;
}
