#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>
inline T range(T l, T r) {
  return uniform_int_distribution<T>(l, r)(rng);
}
inline void setin(string s) { freopen(s.c_str(), "r", stdin); }
inline void setout(string s) { freopen(s.c_str(), "w", stdout); }
template <typename T>
void Min(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void Max(T &a, T b) {
  a = max(a, b);
}
const int mod = 1e9 + 7;
const int inf = 2e9;
const int N = 2e5 + 15;
int n, m, q, a[N];
int dp[N];
int p[N], sz[N];
bool d[N], bipartite[N];
pair<int, int> e[N];
struct roll {
  int v, sz, d, bipartite;
};
vector<roll> back;
unordered_set<int> cur;
int find(int v, int &dist) {
  while (v != p[v]) {
    dist ^= d[v];
    v = p[v];
  }
  return v;
}
int find(int v) {
  while (v != p[v]) v = p[v];
  return v;
}
inline void upd(int x, bool flag) {
  if (flag == false)
    cur.insert(x);
  else if (cur.count(x))
    cur.erase(x);
}
bool unio(int a, int b) {
  int x = 0, y = 0;
  a = find(a, x);
  b = find(b, y);
  back.push_back({a, sz[a], d[a], bipartite[a]});
  back.push_back({b, sz[b], d[b], bipartite[b]});
  if (a == b) {
    if (x == y) bipartite[a] = false;
    upd(a, bipartite[a]);
    return false;
  }
  if (sz[a] < sz[b]) swap(a, b);
  if (cur.count(b)) cur.erase(b);
  p[b] = a;
  sz[a] += sz[b];
  d[b] = x ^ y ^ 1;
  bipartite[a] &= bipartite[b];
  upd(a, bipartite[a]);
  return true;
}
inline void remove() {
  int v = back.back().v, size = back.back().sz;
  bool dist = back.back().d, flag = back.back().bipartite;
  p[v] = v, sz[v] = size;
  d[v] = dist, bipartite[v] = flag;
  upd(v, flag);
  back.pop_back();
}
bool add(int l, int r) {
  bool odd_cycle = false;
  for (int i = l; i <= r; ++i) {
    unio(e[i].first, e[i].second);
    if (bipartite[find(e[i].first)] == false ||
        bipartite[find(e[i].second)] == false)
      odd_cycle = true;
  }
  return odd_cycle;
}
void rec(int l, int r, int l_opt, int r_opt) {
  if (l > r) return;
  int mid = l + r >> 1;
  int back_size_before = back.size();
  add(l, mid - 1);
  if (!cur.empty()) dp[mid] = r_opt;
  for (int i = r_opt; i >= max(mid, l_opt); --i) {
    int u = e[i].first, v = e[i].second;
    unio(u, v);
    if (bipartite[find(u)] == 0 || bipartite[find(v)] == 0) Max(dp[mid], i - 1);
  }
  while (back.size() > back_size_before) remove();
  back_size_before = back.size();
  add(dp[mid] + 1, r_opt);
  rec(l, mid - 1, l_opt, dp[mid]);
  while (back.size() > back_size_before) remove();
  back_size_before = back.size();
  add(l, mid);
  rec(mid + 1, r, dp[mid], r_opt);
  while (back.size() > back_size_before) remove();
}
bool precheck() {
  for (int i = 1; i <= m; ++i) unio(e[i].first, e[i].second);
  bool flag = true;
  for (int i = 1; i <= n; ++i)
    if (bipartite[find(i)] == false) flag = false;
  while (!back.empty()) remove();
  return flag;
}
int main() {
  for (int i = 0; i < N; ++i)
    bipartite[i] = true, p[i] = i, sz[i] = 1, d[i] = 0;
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= m; ++i) cin >> e[i].first >> e[i].second;
  if (precheck()) {
    while (q--) cout << "NO" << '\n';
    return 0;
  }
  rec(1, m, 1, m);
  while (q--) {
    int l, r;
    cin >> l >> r;
    cout << (dp[l] >= r ? "YES" : "NO") << '\n';
  }
  return 0;
}
