#include <bits/stdc++.h>
using namespace std;
const long long inf = 1LL << 60;
const long long md = 1e9 + 7;
const long double eps = 1e-14;
void fail() {
  puts("unfair");
  exit(0);
}
int main() {
  int n, b, q;
  cin >> n >> b >> q;
  vector<pair<int, int> > hi(q + 2);
  for (int i = (0); i < int(q); ++i) cin >> hi[i].first >> hi[i].second;
  hi[q] = pair<int, int>(b, n);
  hi[q + 1] = pair<int, int>(0, 0);
  sort(hi.begin(), hi.end());
  vector<int> mi(q + 1), tt(q + 1), cc(5);
  vector<vector<int> > c(q + 1, vector<int>(5));
  for (int i = (0); i < int(q + 1); ++i) {
    int l = hi[i].first + 1, r = hi[i + 1].first + 1;
    tt[i] = r - l;
    mi[i] = r - l - (hi[i + 1].second - hi[i].second);
    if (mi[i] < 0) fail();
    for (int x = (l); x < int(r); ++x) ++c[i][x % 5];
    for (int x = (0); x < int(5); ++x) cc[x] += c[i][x];
  }
  for (int mk = (0); mk < int(32); ++mk) {
    int di = 0;
    for (int x = (0); x < int(5); ++x)
      if (mk & (1 << x)) {
        di += n / 5;
        di -= cc[x];
      }
    for (int i = (0); i < int(q + 1); ++i) {
      int d = mi[i] - tt[i];
      for (int x = (0); x < int(5); ++x)
        if (mk & (1 << x)) d += c[i][x];
      if (d > 0) di += d;
    }
    if (di > 0) fail();
  }
  puts("fair");
}
