#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
int head[10010], cnt = 1, cur[10010], dis[N], s, t;
struct edge {
  int next, to, w;
} e[N << 1];
struct query {
  int u, t;
} q[N];
int main() {
  auto add = [&](int u, int v, int w) {
    e[++cnt] = {head[u], v, w};
    head[u] = cnt;
  };
  auto add_edge = [&](int u, int v, int w) {
    add(u, v, w);
    add(v, u, 0);
  };
  auto bfs = [&]() {
    for (int i = 1; i <= t; i++) dis[i] = -1;
    dis[s] = 0;
    queue<int> q;
    q.push(s);
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      for (int i = head[u]; i; i = e[i].next) {
        int v = e[i].to;
        if (e[i].w && dis[v] == -1) {
          dis[v] = dis[u] + 1;
          q.push(v);
        }
      }
    }
    return dis[t] != -1;
  };
  function<int(int, int)> dfs = [&](int u, int flo) {
    if (u == t) return flo;
    int detla = flo;
    for (int &i = cur[u]; i; i = e[i].next) {
      int v = e[i].to;
      if (e[i].w && dis[v] == dis[u] + 1) {
        int d = dfs(v, min(detla, e[i].w));
        e[i].w -= d;
        e[i ^ 1].w += d;
        detla -= d;
        if (detla == 0) break;
      }
    }
    return flo - detla;
  };
  auto dini = [&]() {
    int ans = 0;
    while (bfs()) memcpy(cur, head, sizeof cur), ans += dfs(s, INF);
    return ans;
  };
  auto cal = [&](int l, int r, int k) {
    int L = l - k + 5, R = r - k + 5;
    return R / 5 - L / 5;
  };
  int n, b, Q;
  scanf("%d %d %d", &n, &b, &Q);
  for (int i = 1; i <= Q; i++) scanf("%d %d", &q[i].u, &q[i].t);
  q[++Q] = query{0, 0};
  q[++Q] = query{b, n};
  sort(q + 1, q + Q + 1, [](const query a, const query b) {
    return a.u == b.u ? a.t < b.t : a.u < b.u;
  });
  for (int i = 2; i <= Q; i++)
    if ((q[i - 1].u == q[i].u && q[i - 1].t < q[i].t) || q[i - 1].t > q[i].t)
      return puts("unfair");
  int p = 0;
  s = Q + 5 + 1, t = s + 1;
  for (int i = 1; i <= Q; i++) {
    add_edge(s, i, q[i].t - q[i - 1].t);
    p += q[i].t - q[i - 1].t;
    for (int j = 0; j < 5; j++) {
      add_edge(i, Q + j + 1, cal(q[i - 1].u, q[i].u, j));
    }
  }
  for (int i = 0; i < 5; i++) add_edge(Q + i + 1, t, n / 5);
  puts(dini() == n ? "fair" : "unfair");
  return 0;
}
