#include <bits/stdc++.h>
using namespace std;
using namespace std;
struct edge {
  int to, cap, rev;
  edge(int a, int b, int c) {
    to = a;
    cap = b;
    rev = c;
  }
};
vector<edge> G[10201];
int level[10201];
int iter[10201];
void add_edge(int from, int to, int cap) {
  G[from].push_back(edge(to, cap, G[to].size()));
  G[to].push_back(edge(from, 0, 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;
  while (true) {
    bfs(s);
    if (level[t] < 0) return flow;
    memset(iter, 0, sizeof(iter));
    int f;
    while ((f = dfs(s, t, INT_MAX)) > 0) {
      flow += f;
    }
  }
}
vector<pair<int, int> > query;
int n, b, q;
int main() {
  cin >> n >> b >> q;
  for (int i = 0; i < q; i++) {
    int upto, num;
    scanf("%d%d", &upto, &num);
    query.push_back({upto, num});
  }
  query.push_back({b, n});
  sort(query.begin(), query.end());
  for (int i = 1; i < q; i++) {
    int tmp = query[i].second - query[i - 1].second;
    if (tmp < 0 || tmp > query[i].first - query[i - 1].first) {
      printf("unfair");
      return 0;
    }
  }
  const int s = 10, t = 11;
  for (int i = 0; i < 5; i++) add_edge(i, t, n / 5);
  int qnum = 12;
  for (int i = 0; i < query.size(); i++) {
    int cnt[5];
    memset(cnt, 0, sizeof cnt);
    if (query[i].first == query[i - 1].first) continue;
    if (i >= 1)
      cnt[0] = query[i].second - query[i - 1].second;
    else
      cnt[0] = query[i].second;
    if (cnt[0] != 0) add_edge(s, qnum, cnt[0]);
    int up2;
    if (i >= 1)
      up2 = query[i - 1].first;
    else
      up2 = 0;
    int up1 = query[i].first;
    for (int j = 0; j < 5; j++) cnt[j] = up1 / 5;
    for (int j = 0; j < up1 % 5; j++) cnt[j] += 1;
    for (int j = 0; j < 5; j++) cnt[j] -= up2 / 5;
    for (int j = 0; j < up2 % 5; j++) cnt[j] += -1;
    for (int j = 0; j < 5; j++) add_edge(qnum, j, cnt[j]);
    qnum++;
  }
  int f = max_flow(s, t);
  if (f == n)
    printf("fair");
  else
    printf("unfair");
  return 0;
}
