#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int maxn = 1e4 + 5;
int n, b, q;
int a[maxn], c[maxn];
inline int f(int x, int j) { return (x / 5) + (x % 5 >= j); }
inline int calc(int j, int l, int r) { return f(r, j) - f(l - 1, j); }
int main() {
  scanf("%d%d%d", &n, &b, &q);
  memset(a, -1, sizeof(a));
  for (int i = (0); i < (q); ++i) {
    int x, k;
    scanf("%d%d", &x, &k);
    if (~a[x] && a[x] != k) {
      puts("unfair");
      return 0;
    }
    a[x] = k;
  }
  if (~a[b] && a[b] != n) {
    puts("unfair");
    return 0;
  }
  a[b] = n;
  a[0] = 0;
  for (int msk = (0); msk < (1 << 5); ++msk) {
    int x, gmn = 0, gmx = 0, lst = 0;
    for (int i = (1); i <= (b); ++i)
      if (~a[i]) {
        int sub = 0, nin = 0;
        if (a[i] < a[lst]) {
          puts("unfair");
          return 0;
        }
        for (int j = (0); j < (5); ++j) {
          if (msk >> j & 1)
            sub += calc(j, lst + 1, i);
          else
            nin += calc(j, lst + 1, i);
        }
        gmx += min(a[i] - a[lst], sub);
        gmn += max(0, a[i] - a[lst] - nin);
        if (a[i] - a[lst] > i - lst) {
          puts("unfair");
          return 0;
        }
        lst = i;
      }
    x = __builtin_popcount(msk) * n / 5;
    if (x > gmx || x < gmn) {
      puts("unfair");
      return 0;
    }
  }
  puts("fair");
  return 0;
}
