#include <bits/stdc++.h>
#pragma GCC optimize "Ofast"
using namespace std;
const int N = 2e5 + 5;
const int B = 500;
int a[N], b[N];
int p[N], s[N];
int f[N], flag;
int ans[N];
pair<int, int> lead(int x) {
  int v = 0;
  while (x != p[x]) {
    v ^= f[x];
    x = p[x];
  }
  return pair<int, int>(x, v);
}
stack<pair<int*, int> > ops;
void app(int* a, int v) {
  ops.push(make_pair(a, *a));
  *a = v;
}
void add(int x, int y) {
  pair<int, int> pa = lead(x);
  pair<int, int> emplace_back = lead(y);
  if (pa.first == emplace_back.first) {
    if (pa.second == emplace_back.second) app(&flag, 1);
    return;
  }
  if (s[pa.first] < s[emplace_back.first]) swap(pa, emplace_back);
  app(p + emplace_back.first, pa.first);
  app(f + emplace_back.first, pa.second ^ emplace_back.second ^ 1);
  app(s + pa.first, s[pa.first] + s[emplace_back.first]);
}
void roll_back(int len) {
  while ((int)ops.size() > len) *ops.top().first = ops.top().second, ops.pop();
}
void calc(int l1, int r1, int l2, int r2) {
  if (l1 > r1) return;
  if (l2 > r2) return;
  if (l2 == r2) {
    for (int i = l1; i <= r1; ++i) ans[i] = l2;
    return;
  }
  int m1 = (l1 + r1) / 2;
  int m2 = 0;
  int len = (int)ops.size();
  for (int i = l1; i < m1; ++i) add(a[i], b[i]);
  for (int i = r2; i >= l2; --i) {
    add(a[i], b[i]);
    if (flag) {
      ans[m1] = m2 = i;
      break;
    }
  }
  roll_back(len);
  if (!m2) ans[m1] = m2 = l2;
  for (int i = r2; i > m2; --i) add(a[i], b[i]);
  calc(l1, m1 - 1, l2, m2);
  roll_back(len);
  for (int i = l1; i <= m1; ++i) add(a[i], b[i]);
  calc(m1 + 1, r1, m2, r2);
  roll_back(len);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int m;
  cin >> m;
  int q;
  cin >> q;
  for (int i = 1; i <= m; ++i) {
    cin >> a[i];
    a[i]--;
    cin >> b[i];
    b[i]--;
  }
  b[m + 1] = n;
  f[n] = 1;
  iota(p, p + n, 0);
  fill(s, s + n, 1);
  calc(1, m, 1, m + 1);
  for (int i = 0; i < q; ++i) {
    int l;
    cin >> l;
    int r;
    cin >> r;
    if (r < ans[l])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
