#include <bits/stdc++.h>
using namespace std;
const int maxn = 10000 + 10;
const int inf = 0x3f3f3f3f;
struct node {
  int pos, val;
  bool operator<(const node &n) const {
    if (pos == n.pos) return val < n.val;
    return pos < n.pos;
  }
} a[maxn];
struct edge {
  int to, cap, rev;
};
vector<edge> G[maxn];
int level[maxn], iter[maxn];
void add(int from, int to, int cap) {
  G[from].push_back((edge){to, cap, (int)G[to].size()});
  G[to].push_back((edge){from, 0, (int)G[from].size() - 1});
}
void bfs(int s) {
  memset(level, -1, sizeof level);
  queue<int> que;
  level[s] = 0;
  que.push(s);
  while (!que.empty()) {
    int v = que.front();
    que.pop();
    for (int i = 0; i < G[v].size(); i++) {
      edge &e = G[v][i];
      if (e.cap > 0 && level[e.to] < 0) {
        level[e.to] = level[v] + 1;
        que.push(e.to);
      }
    }
  }
}
int dfs(int v, int t, int f) {
  if (v == t) return f;
  for (int &i = iter[v]; i < G[v].size(); i++) {
    edge &e = G[v][i];
    if (e.cap > 0 && level[v] < level[e.to]) {
      int d = dfs(e.to, t, min(f, e.cap));
      if (d > 0) {
        e.cap -= d;
        G[e.to][e.rev].cap += d;
        return d;
      }
    }
  }
  return 0;
}
int max_flow(int s, int t) {
  int flow = 0;
  for (;;) {
    bfs(s);
    if (level[t] < 0) return flow;
    memset(iter, 0, sizeof iter);
    int f;
    while ((f = dfs(s, t, inf)) > 0) flow += f;
  }
}
int main() {
  int n, b, q, s[5];
  scanf("%d%d%d", &n, &b, &q);
  for (int i = 0; i < q; i++) scanf("%d%d", &a[i].pos, &a[i].val);
  sort(a, a + q);
  if (a[q - 1].pos < b) a[q].pos = b, a[q].val = n, q++;
  int lasp = 0, lasx = 0;
  int S = 0, T, tot = 5;
  for (int i = 0; i < q; i++) {
    if (a[i].val < lasx || a[i].val - lasx > a[i].pos - lasp)
      return 0 * puts("unfair");
    ++tot;
    add(S, tot, a[i].val - lasx);
    memset(s, 0, sizeof s);
    for (int j = lasp + 1; j <= a[i].pos; j++) s[j % 5]++;
    for (int i = 0; i < 5; i++) add(tot, i + 1, s[i]);
    lasx = a[i].val, lasp = a[i].pos;
  }
  T = tot + 1;
  for (int i = 1; i <= 5; i++) add(i, T, n / 5);
  printf("%s\n", max_flow(S, T) == n ? "fair" : "unfair");
  return 0;
}
