#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 1e5 + 5, inf = 1e9;
int stok = N - 2, istok = N - 1;
struct edge {
  int from, to, f, c, link;
};
vector<edge> g[N];
bool used[N];
int dfs(int v, int cur_f) {
  used[v] = true;
  if (v == stok) return cur_f;
  for (auto& i : g[v]) {
    if (!used[i.to] && i.c > i.f) {
      int delt = dfs(i.to, min(cur_f, i.c - i.f));
      if (delt) {
        i.f += delt;
        g[i.to][i.link].f -= delt;
        return delt;
      }
    }
  }
  return 0;
}
struct segment {
  int l, r, cn;
};
void die() {
  cout << "unfair";
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, b, q;
  cin >> n >> b >> q;
  for (int i = 0; i < 5; ++i) {
    g[istok].push_back({istok, i, 0, n / 5, (int)g[i].size()});
    g[i].push_back({i, istok, 0, 0, (int)g[istok].size() - 1});
  }
  vector<pair<int, int>> qq;
  qq.emplace_back(b, n);
  for (int i = 0; i < q; ++i) {
    int upto, qu;
    cin >> upto >> qu;
    qq.emplace_back(upto, qu);
  }
  sort(qq.begin(), qq.end());
  int uk = 5;
  vector<segment> segs;
  for (int i = 0; i < (int)qq.size(); ++i) {
    if (i > 0 && qq[i].first == qq[i - 1].first) {
      if (qq[i].second != qq[i - 1].second) die();
      continue;
    }
    if (i == 0)
      segs.push_back({1, qq[i].first, qq[i].second});
    else
      segs.push_back(
          {qq[i - 1].first + 1, qq[i].first, qq[i].second - qq[i - 1].second});
    if (segs.back().cn < 0) die();
  }
  for (int i = 0; i < 5; ++i) {
    for (int j = 0; j < (int)segs.size(); ++j) {
      int rr = segs[j].r / 5;
      if (segs[j].r % 5 >= i && i) rr++;
      int ll = (segs[j].l - 1) / 5;
      if ((segs[j].l - 1) % 5 >= i && i) ll++;
      int c = rr - ll;
      g[i].push_back({i, uk + j, 0, c, (int)g[uk + j].size()});
      g[uk + j].push_back({uk + j, i, 0, 0, (int)g[i].size() - 1});
    }
  }
  for (int j = 0; j < (int)segs.size(); ++j) {
    g[uk + j].push_back({uk + j, stok, 0, segs[j].cn, (int)g[stok].size()});
    g[stok].push_back({stok, uk + j, 0, 0, (int)g[uk + j].size() - 1});
  }
  int ans = 0;
  while (true) {
    fill(used, used + q + 10, false);
    used[stok] = used[istok] = false;
    int d = dfs(istok, inf);
    if (!d) break;
    ans += d;
  }
  cout << (ans == n ? "fair" : "unfair");
}
