#include <bits/stdc++.h>
using namespace std;
const int iinf = 0x3f3f3f3f;
const long long linf = 0x3f3f3f3f3f3f3f3f;
const int N = 1e4;
int n, m, q;
int get(int first, int j) {
  if (j == 0)
    return first / 5;
  else
    return first / 5 + (first % 5 >= j);
}
vector<pair<int, int>> a;
const int fN = N + 8;
int fn, s, t, e[fN];
vector<int> nex, to, fw;
void init() {
  for (int u(0); u < (fn); ++u) e[u] = -1;
}
void adde(int u, int v, int w) {
  nex.push_back(e[u]), e[u] = int((to).size()), to.push_back(v),
                       fw.push_back(w);
  nex.push_back(e[v]), e[v] = int((to).size()), to.push_back(u),
                       fw.push_back(0);
}
int dep[fN], cur[fN], gap[fN], que[fN], *ta, *he;
bool bfs() {
  for (int u(0); u < (fn); ++u) dep[u] = -1, cur[u] = e[u];
  ta = he = que - 1, ++gap[dep[ *++ta = t] = 0];
  while (ta != he) {
    int u = *++he;
    for (int v = e[u]; ~v; v = nex[v])
      if (fw[v ^ 1] && !~dep[to[v]]) ++gap[dep[*++ta = to[v]] = dep[u] + 1];
  }
  return ~dep[s];
}
int dfs(int u, int r) {
  if (u == t || !r) return r;
  int res = 0, f;
  for (int &v = cur[u]; ~v; v = nex[v])
    if (fw[v] && dep[to[v]] == dep[u] - 1 &&
        (f = dfs(to[v], min(fw[v], r))) > 0) {
      fw[v] -= f, fw[v ^ 1] += f, r -= f, res += f;
      if (!r) return res;
    }
  cur[u] = e[u], --gap[dep[u]], ++gap[++dep[u]];
  if (!gap[dep[u]]) dep[s] = n;
  return res;
}
int flow(int res = 0) {
  if (bfs())
    while (dep[s] < n) res += dfs(s, iinf);
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n >> m >> q, ++q, fn = (t = (s = q + 5) + 1) + 1, init();
  for (int i(0); i < (q - 1); ++i) {
    pair<int, int> t;
    cin >> t.first >> t.second, a.push_back(t);
  }
  a.push_back(make_pair(0, 0)), a.push_back(make_pair(m, n)),
      sort(a.begin(), a.end());
  for (int i(0); i < (int((a).size()) - 1); ++i) {
    adde(s, 5 + i, a[i + 1].second - a[i].second);
    for (int j(0); j < (5); ++j) {
      if (a[i + 1].second < a[i].second) cout << "unfair\n", exit(0);
      adde(5 + i, j, get(a[i + 1].first, j) - get(a[i].first, j));
    }
  }
  for (int j(0); j < (5); ++j) adde(j, t, n / 5);
  cout << (flow() == n ? "fair" : "unfair") << '\n';
  return 0;
}
