#include <bits/stdc++.h>
using namespace std;
const int N = 3e4 + 70, M = N - 10, E = 2e5 + 7, INF = 1e9 + 7;
int from[E], to[E], cap[E], prv[E], head[N], ec, q[N], d[N], ptr[N];
bool mark[N];
inline void add_edge(int u, int v, int uv, int vu = 0) {
  from[ec] = u, to[ec] = v, cap[ec] = uv, prv[ec] = head[u], head[u] = ec++;
  from[ec] = v, to[ec] = u, cap[ec] = vu, prv[ec] = head[v], head[v] = ec++;
}
inline bool bfs(int source, int sink) {
  memset(d, 63, sizeof d);
  int h = 0, t = 0;
  d[source] = 0;
  q[t++] = source;
  while (h < t) {
    int v = q[h++];
    for (int i = head[v]; i != -1; i = prv[i]) {
      int u = to[i];
      if (cap[i] && d[u] > d[v] + 1) {
        d[u] = d[v] + 1;
        q[t++] = u;
      }
    }
  }
  return (d[sink] < 1e9);
}
int dfs(int v, int sink, int flow = INF) {
  if (v == sink) return flow;
  if (mark[v] || flow == 0) return 0;
  mark[v] = 1;
  for (int i = head[v]; i != -1; i = prv[i]) {
    int x = dfs(to[i], sink, min(flow, cap[i]));
    if (x > 0) {
      cap[i] -= x;
      cap[i ^ 1] += x;
      return x;
    }
  }
  return 0;
}
inline int maxflow(int source, int sink) {
  int ans = 0, f = 0;
  while (f = dfs(source, sink)) {
    ans += f;
    memset(mark, 0, sizeof mark);
  }
  return ans;
}
int main() {
  vector<pair<int, int>> v;
  memset(head, -1, sizeof head);
  int source = N - 1, sink = N - 2;
  int n, b, q;
  scanf("%d%d%d", &n, &b, &q);
  v.push_back({b, n});
  for (int i = 0; i < q; i++) {
    int a, t;
    scanf("%d%d", &a, &t);
    v.push_back({a, t});
  }
  sort(v.begin(), v.end());
  int num = b;
  for (int j = 0; j < v[0].first; j++) {
    add_edge(num, j, INF);
  }
  num++;
  add_edge(num, num - 1, v[0].second);
  num++;
  int l = num - 1;
  for (int i = 1; i < v.size(); i++) {
    int b = num, c = num + 1;
    num += 2;
    if (v[i].second < v[i - 1].second) {
      printf("unfair\n");
      return 0;
    }
    add_edge(b, l, v[i].second);
    l = b;
    add_edge(b, c, v[i].second - v[i - 1].second);
    for (int j = v[i - 1].first; j < v[i].first; j++) add_edge(c, j, 1);
  }
  add_edge(source, l, INF);
  for (int k = 0; k < 5; k++) {
    add_edge(M + k, sink, n / 5);
    for (int j = k; j < b; j += 5) add_edge(j, M + k, 1);
  }
  int flow = maxflow(source, sink);
  if (flow == n)
    printf("fair\n");
  else
    printf("unfair\n");
  return 0;
}
