#include <bits/stdc++.h>
using namespace std;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1ll;
  long long _tmp = mypow(_a, _x / 2, _mod);
  _tmp = (_tmp * _tmp) % _mod;
  if (_x & 1) _tmp = (_tmp * _a) % _mod;
  return _tmp;
}
inline long long add(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x + _y;
  if (_ >= _mod) _ -= _mod;
  return _;
}
inline long long sub(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x - _y;
  if (_ < 0) _ += _mod;
  return _;
}
inline long long mul(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x * _y;
  if (_ >= _mod) _ %= _mod;
  return _;
}
inline bool equal(double _x, double _y) {
  return _x > _y - 1e-9 && _x < _y + 1e-9;
}
int __ = 1, _cs;
struct Maxflow {
  static const int MAXV = 20010;
  static const int INF = 1000000;
  struct Edge {
    int v, c, r;
    Edge(int _v, int _c, int _r) : v(_v), c(_c), r(_r) {}
  };
  int s, t;
  vector<Edge> G[MAXV * 2];
  int iter[MAXV * 2], d[MAXV * 2], gap[MAXV * 2], tot;
  void flowinit(int x) {
    tot = x + 2;
    s = x + 1, t = x + 2;
    for (int i = 0; i <= tot; i++) {
      G[i].clear();
      iter[i] = d[i] = gap[i] = 0;
    }
  }
  void addEdge(int u, int v, int c) {
    G[u].push_back(Edge(v, c, (int)(G[v]).size()));
    G[v].push_back(Edge(u, 0, (int)(G[u]).size() - 1));
  }
  int dfs(int p, int flow) {
    if (p == t) return flow;
    for (int &i = iter[p]; i < (int)(G[p]).size(); i++) {
      Edge &e = G[p][i];
      if (e.c > 0 && d[p] == d[e.v] + 1) {
        int f = dfs(e.v, min(flow, e.c));
        if (f) {
          e.c -= f;
          G[e.v][e.r].c += f;
          return f;
        }
      }
    }
    if ((--gap[d[p]]) == 0)
      d[s] = tot;
    else {
      d[p]++;
      iter[p] = 0;
      ++gap[d[p]];
    }
    return 0;
  }
  int maxflow() {
    int res = 0;
    gap[0] = tot;
    for (res = 0; d[s] < tot; res += dfs(s, INF))
      ;
    return res;
  }
} flow;
void build() {}
int n, b, q;
vector<pair<int, int> > v;
void init() {
  n = getint();
  b = getint();
  q = getint();
  v.push_back(make_pair(0, 0));
  v.push_back(make_pair(b, n));
  for (int i = 0; i < q; i++) {
    int ui = getint();
    int qi = getint();
    v.push_back(make_pair(ui, qi));
  }
  q++;
  sort((v).begin(), (v).end());
}
int res[5], md[5];
void solve() {
  for (int i = 1; i <= q; i++)
    if (v[i].first - v[i - 1].first < v[i].second - v[i - 1].second ||
        v[i].second < v[i - 1].second) {
      puts("unfair");
      return;
    }
  for (int i = 1; i < q; i++)
    if (v[i].first == v[i + 1].first && v[i].second != v[i + 1].second) {
      puts("unfair");
      return;
    }
  int per = n / 5;
  for (int i = 1; i <= b; i++) res[i % 5]++;
  for (int i = 1; i <= q; i++)
    if (v[i].second == v[i - 1].second) {
      for (int k = v[i - 1].first + 1; k <= v[i].first; k++) res[k % 5]--;
    }
  for (int i = 0; i < 5; i++)
    if (res[i] < per) {
      puts("unfair");
      return;
    }
  flow.flowinit(5 + q + b);
  for (int i = q + b + 1; i <= q + b + 5; i++) {
    flow.addEdge(flow.s, i, per);
    md[i - (q + b + 1)] = i;
  }
  for (int i = 1; i <= b; i++) flow.addEdge(md[i % 5], i, 1);
  for (int i = 1; i <= q; i++) {
    for (int j = v[i - 1].first + 1; j <= v[i].first; j++)
      flow.addEdge(j, b + i, 1);
    if (v[i].second > v[i - 1].second)
      flow.addEdge(b + i, flow.t, v[i].second - v[i - 1].second);
  }
  if (flow.maxflow() == n)
    puts("fair");
  else
    puts("unfair");
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}
