#include <bits/stdc++.h>
using namespace std;
int nex[200005], wen[200005], hea[100005], cur[100005], dep[100005], n, m, p, q,
    s, t, lr[100005], cap[200005], ans, len;
struct arr {
  int x, y;
} a[1000000];
bool cmp(arr x, arr y) { return x.x < y.x; }
void add(int x, int y, int z) {
  nex[len] = hea[x];
  wen[len] = y;
  cap[len] = z;
  hea[x] = len;
  ++len;
}
void Add(int x, int y, int z) {
  if (z == 0) return;
  add(x, y, z);
  add(y, x, 0);
}
int bfs() {
  int l, r;
  for (int i = s; i <= t; i++) {
    cur[i] = hea[i];
    dep[i] = 0;
    lr[i] = 0;
  }
  lr[1] = s;
  l = 1;
  r = 1;
  dep[s] = 1;
  while (l <= r) {
    int k = lr[l], i = hea[lr[l]];
    while (i >= 0) {
      if (cap[i] > 0 && dep[wen[i]] == 0) {
        dep[wen[i]] = dep[k] + 1;
        lr[++r] = wen[i];
      }
      i = nex[i];
    }
    l++;
  }
  return dep[t] != 0;
}
int dfs(int x, int y) {
  if (x == t) return y;
  int k = cur[x], ans = 0;
  while (k >= 0) {
    if (cap[k] > 0 && dep[wen[k]] > dep[x]) {
      int t = dfs(wen[k], min(y, cap[k]));
      ans += t;
      y -= t;
      cap[k] -= t;
      cap[k ^ 1] += t;
      if (y == 0) return ans;
    }
    k = nex[k];
    cur[x] = k;
  }
  if (ans == 0) dep[x] = 0;
  return ans;
}
int find(int x, int y) {
  if (x < y) return -1;
  return ((x - y) / 5);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  s = 1;
  t = q + 100;
  for (int i = s; i <= t; i++) hea[i] = -1;
  for (int i = 1; i <= q; i++) scanf("%d%d", &a[i].x, &a[i].y);
  sort(a + 1, a + q + 1, cmp);
  a[q + 1].x = m;
  a[q + 1].y = n;
  for (int i = 1; i <= q + 1; i++) {
    if (a[i].y - a[i - 1].y < 0 || a[i].x - a[i - 1].x < 0) {
      puts("unfair");
      return 0;
    }
    Add(s, i + 1, a[i].y - a[i - 1].y);
    Add(i + 1, t - 5, a[i].x / 5 - a[i - 1].x / 5);
    Add(i + 1, t - 4, find(a[i].x, 1) - find(a[i - 1].x, 1));
    Add(i + 1, t - 3, find(a[i].x, 2) - find(a[i - 1].x, 2));
    Add(i + 1, t - 2, find(a[i].x, 3) - find(a[i - 1].x, 3));
    Add(i + 1, t - 1, find(a[i].x, 4) - find(a[i - 1].x, 4));
  }
  Add(t - 5, t, n / 5);
  Add(t - 4, t, n / 5);
  Add(t - 3, t, n / 5);
  Add(t - 2, t, n / 5);
  Add(t - 1, t, n / 5);
  while (bfs()) {
    int y = 21000000;
    dep[t] = t + 2;
    ans += dfs(s, y);
  }
  if (ans == n)
    puts("fair");
  else
    puts("unfair");
}
