#include <bits/stdc++.h>
using namespace std;
const int maxn = 500005;
const int INF = (1 << 30) - 1;
struct Edge {
  int v, next, c;
} e[maxn];
struct node {
  int l, x;
} a[maxn];
int cmp(node n1, node n2) { return n1.l < n2.l; }
int st, ed, lev[maxn], first[maxn], now[maxn], ecnt;
int n, m;
int B, Q;
void init(int a, int b) {
  st = a;
  ed = b;
  memset(first, -1, sizeof(first));
  ecnt = 0;
}
void addedges(int u, int v, int c) {
  e[ecnt].next = first[u];
  e[ecnt].v = v;
  e[ecnt].c = c;
  first[u] = ecnt++;
  e[ecnt].next = first[v];
  e[ecnt].v = u;
  e[ecnt].c = 0;
  first[v] = ecnt++;
}
bool bfs() {
  queue<int> q;
  while (!q.empty()) q.pop();
  q.push(st);
  memset(lev, -1, sizeof(lev));
  lev[st] = 0;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = first[x]; ~i; i = e[i].next) {
      int v = e[i].v;
      if (lev[v] < 0 && e[i].c > 0) {
        lev[v] = lev[x] + 1;
        q.push(v);
      }
    }
  }
  return lev[ed] != -1;
}
int dfs(int p, int minf) {
  if (p == ed || minf == 0) return minf;
  for (int &i = now[p]; ~i; i = e[i].next) {
    int v = e[i].v;
    if (lev[v] == lev[p] + 1 && e[i].c > 0) {
      int d = dfs(v, min(e[i].c, minf));
      if (d > 0) {
        e[i].c -= d;
        e[i ^ 1].c += d;
        return d;
      }
    }
  }
  return 0;
}
int dinic() {
  int max_flow = 0, p1;
  while (bfs()) {
    memcpy(now, first, sizeof(first));
    while ((p1 = dfs(st, INF)) > 0) max_flow += p1;
  }
  return max_flow;
}
int main() {
  while (scanf("%d %d %d", &n, &B, &Q) != EOF) {
    init(0, Q + 7);
    for (int i = 1; i <= Q; i++) scanf("%d %d", &a[i].l, &a[i].x);
    a[0].l = 0;
    a[0].x = 0;
    Q++;
    a[Q].l = B;
    a[Q].x = n;
    sort(a + 1, a + Q + 1, cmp);
    for (int i = 1; i <= 5; i++) addedges(st, i, n / 5);
    for (int i = 1; i <= Q; i++) {
      if (a[i].x < a[i - 1].x ||
          (a[i].x != a[i - 1].x && a[i].l == a[i - 1].l)) {
        puts("unfair");
        return 0;
      }
      addedges(i + 5, ed, a[i].x - a[i - 1].x);
      for (int j = 1; j <= 5; j++) {
        int lb = a[i - 1].l / 5 + (a[i - 1].l % 5 >= j);
        int ub = a[i].l / 5 + (a[i].l % 5 >= j);
        addedges(j, i + 5, ub - lb);
      }
    }
    int flow = dinic();
    if (flow == n)
      puts("fair");
    else
      puts("unfair");
  }
  return 0;
}
