#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 10105;
int n, b, q, st, ed;
int First[maxn], cnt, dis[maxn];
struct edge {
  int to, Next, flow, c;
} Tree[maxn * 100];
void init() {
  cnt = 0;
  memset(First, -1, sizeof(First));
}
void addedge(int from, int to, int flow) {
  Tree[cnt].to = to;
  Tree[cnt].Next = First[from];
  Tree[cnt].flow = flow;
  First[from] = cnt++;
  Tree[cnt].to = from;
  Tree[cnt].Next = First[to];
  Tree[cnt].flow = 0;
  First[to] = cnt++;
}
bool bfs(int st, int ed) {
  memset(dis, 0, sizeof(dis));
  queue<int> Q;
  dis[st] = 1;
  Q.push(st);
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    for (int i = First[u]; i != -1; i = Tree[i].Next) {
      int v = Tree[i].to;
      int flow = Tree[i].flow;
      if (flow && !dis[v]) {
        dis[v] = dis[u] + 1;
        if (v == ed) return true;
        Q.push(v);
      }
    }
  }
  return false;
}
int dfs(int u, int minf) {
  if (u == ed) {
    return minf;
  }
  if (minf == 0) return minf;
  int f = 0;
  for (int i = First[u]; i != -1; i = Tree[i].Next) {
    int v = Tree[i].to;
    if (Tree[i].flow && dis[v] == dis[u] + 1) {
      int tmp = dfs(v, min(Tree[i].flow, minf));
      Tree[i].flow -= tmp;
      Tree[i ^ 1].flow += tmp;
      f += tmp;
      minf -= tmp;
      if (minf == 0) return f;
    }
  }
  return f;
}
int dinic(int st, int ed) {
  int res = 0;
  while (bfs(st, ed)) res += dfs(st, INF);
  return res;
}
struct node {
  int up, num;
  bool operator<(const node& A) const {
    if (A.up != up) return A.up > up;
    return A.num > num;
  }
} ax[10005];
int sum[10];
int main() {
  init();
  scanf("%d%d%d", &n, &b, &q);
  st = 0, ed = q + 5 + 10;
  for (int i = 1; i <= q; i++) scanf("%d%d", &ax[i].up, &ax[i].num);
  sort(ax + 1, ax + 1 + q);
  ax[q + 1].up = b, ax[q + 1].num = n;
  for (int i = 1; i <= q + 1; i++) {
    int nowv = ax[i].up - ax[i - 1].up;
    int nowb = ax[i].num - ax[i - 1].num;
    if (ax[i].num > n || nowb > nowv || nowb < 0) {
      puts("unfair");
      return 0;
    }
    for (int j = ax[i - 1].up + 1; j <= ax[i].up; j++) {
      sum[j % 5]++;
    }
    for (int j = 0; j < 5; j++) addedge(i, q + j + 2, sum[j]);
    addedge(st, i, nowb);
    memset(sum, 0, sizeof(sum));
  }
  for (int i = 1; i <= 5; i++) addedge(q + i + 1, ed, n / 5);
  int max1 = dinic(st, ed);
  if (max1 == n)
    puts("fair");
  else
    puts("unfair");
  return 0;
}
