#include <bits/stdc++.h>
using namespace std;
const int N = 3e4 + 10, M = N * 4, inf = 2e9;
template <class o>
void qr(o &x) {
  char c = getchar();
  int f = 1;
  x = 0;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x *= f;
}
template <class o>
void qw(o x) {
  if (x / 10) qw(x / 10);
  putchar(x % 10 + '0');
}
template <class o>
void pr1(o x) {
  if (x < 0) x = -x, putchar('-');
  qw(x);
  putchar(' ');
}
template <class o>
void pr2(o x) {
  if (x < 0) x = -x, putchar('-');
  qw(x);
  puts("");
}
int n, b, m, st, ed, cnt, d[N], ans;
pair<int, int> q[N];
struct edge {
  int y, next, c;
} a[M];
int len = 1, last[N], cur[N];
void ins(int x, int y, int z) {
  a[++len] = (edge){y, last[x], z};
  last[x] = len;
}
void add(int x, int y, int z) {
  ins(x, y, z);
  ins(y, x, 0);
}
bool bfs() {
  memset(d, 0, sizeof d);
  static int q[N], l, r;
  q[l = r = 1] = st;
  d[st] = 1;
  memcpy(cur, last, sizeof cur);
  while (l <= r) {
    int x = q[l++];
    for (int k = last[x], y; k; k = a[k].next)
      if (!d[y = a[k].y] && a[k].c) {
        d[y] = d[x] + 1;
        q[++r] = y;
      }
  }
  return d[ed];
}
int dfs(int x, int f) {
  if (x == ed) return f;
  int s = 0, t;
  for (int &k = cur[x], y, z; k; k = a[k].next) {
    y = a[k].y;
    z = a[k].c;
    if (z > 0 && d[y] == d[x] + 1) {
      s += t = dfs(y, min(f - s, z));
      a[k].c -= t;
      a[k ^ 1].c += t;
      if (s == f) return f;
    }
  }
  if (!s) d[x] = 0;
  return s;
}
int dicnic() {
  int s = 0;
  while (bfs()) s += dfs(st, inf);
  return s;
}
void out() {
  puts("unfair");
  exit(0);
}
int main() {
  qr(n);
  qr(b);
  qr(m);
  for (int i = 1; i <= m; i++) qr(q[i].first), qr(q[i].second);
  q[++m] = make_pair(b, n);
  sort(q + 1, q + m + 1);
  for (int i = 1; i <= m; i++)
    if (q[i].second - q[i - 1].second < 0 ||
        q[i].second - q[i - 1].second > q[i].first - q[i - 1].first)
      out();
  st = 0;
  ed = (cnt = b + 1);
  for (int i = 0; i < 5; i++) add(++cnt, ed, n / 5);
  for (int i = 1; i <= m; i++) {
    int l = q[i - 1].first + 1, r = q[i].first,
        x = q[i].second - q[i - 1].second;
    add(st, ++cnt, x);
    while (l <= r) add(cnt, l, 1), add(l, ed + l % 5 + 1, 1), l++;
  }
  puts(dicnic() == n ? "fair" : "unfair");
  return 0;
}
