#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
const int inf = 1 << 30;
const int maxn = 1e4 + 5;
inline void fastio() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void GG() {
  cout << "unfair" << endl;
  exit(0);
}
namespace Flow {
const int maxn = 2e4 + 5;
const int maxm = 2e5 + 5;
int head[maxn], cur[maxn], layer[maxn], tot, s, t;
struct edge {
  int u, v, w, nxt;
} es[maxm];
void add(int u, int v, int w) {
  es[++tot] = (edge){u, v, w, head[u]};
  head[u] = tot;
  es[++tot] = (edge){v, u, 0, head[v]};
  head[v] = tot;
}
void init() {
  memset(head, -1, sizeof(head));
  tot = -1;
}
bool bfs() {
  memset(layer, -1, sizeof(layer));
  layer[s] = 0;
  queue<int> q;
  q.push(s);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = head[u]; ~i; i = es[i].nxt) {
      int v = es[i].v, w = es[i].w;
      if (w > 0 && layer[v] == -1) {
        layer[v] = layer[u] + 1;
        q.push(v);
      }
    }
  }
  return ~layer[t];
}
int dfs(int u, int flow) {
  if (u == t) return flow;
  for (int &i = cur[u]; ~i; i = es[i].nxt) {
    int v = es[i].v, w = es[i].w;
    if (w > 0 && layer[v] == layer[u] + 1) {
      int d = dfs(v, min(flow, w));
      if (d > 0) {
        es[i].w -= d;
        es[i ^ 1].w += d;
        return d;
      }
    }
  }
  return 0;
}
int Dinic() {
  int res = 0;
  while (bfs()) {
    memcpy(cur, head, sizeof(cur));
    while (int d = dfs(s, inf)) res += d;
  }
  return res;
}
}  // namespace Flow
pair<int, int> o[maxn];
int f[5][maxn];
int main() {
  fastio();
  {
    int n = 1e4;
    for (int i = (1); i <= (n); i++) {
      for (int j = (0); j <= (4); j++) {
        f[j][i] = f[j][i - 1] + (i % 5 == j);
      }
    }
  }
  Flow::init();
  int n, b, q;
  cin >> n >> b >> q;
  for (int i = (1); i <= (q); i++) {
    cin >> o[i].first >> o[i].second;
  }
  sort(o + 1, o + q + 1);
  if (b < n) GG();
  for (int i = (2); i <= (q); i++) {
    if (o[i].first == o[i - 1].first && o[i].second != o[i - 1].second) GG();
    if (o[i].second < o[i - 1].second) GG();
    if (o[i].second > n) GG();
  }
  Flow::s = 0, Flow::t = 5 + q + 1;
  for (int i = (1); i <= (5); i++) Flow::add(q + i, Flow::t, n / 5);
  for (int i = (1); i <= (q); i++) {
    for (int j = (1); j <= (5); j++) {
      Flow::add(i, q + j, f[j - 1][o[i].first] - f[j - 1][o[i - 1].first]);
    }
    Flow::add(Flow::s, i, o[i].second - o[i - 1].second);
  }
  if (o[q].first != b) {
    for (int j = (1); j <= (5); j++) {
      Flow::add(Flow::t + 1, q + j, f[j - 1][b] - f[j - 1][o[q].first]);
    }
    Flow::add(Flow::s, Flow::t + 1, n - o[q].second);
  }
  int sum = Flow::Dinic();
  if (sum == n)
    cout << "fair" << endl;
  else
    cout << "unfair" << endl;
  return 0;
}
