#include <bits/stdc++.h>
using namespace std;
int nn, n, b, q;
vector<pair<int, int> > d;
int main() {
  d.push_back(make_pair(0, 0));
  scanf("%d%d%d", &n, &b, &q), nn = n;
  d.push_back(make_pair(b, n));
  for (int i = 1; i <= q; i++)
    scanf("%d%d", &b, &n), d.push_back(make_pair(b, n));
  sort(d.begin(), d.end());
  for (int i = 1; i <= q; i++)
    if (d[i].second > d[i + 1].second ||
        d[i + 1].second - d[i].second > d[i + 1].first - d[i].first)
      return printf("unfair\n"), 0;
  for (int k = 0; k < 32; k++) {
    int res = 0;
    for (int i = 1; i <= q + 1; i++) {
      int cnt = 0;
      for (int j = d[i - 1].first + 1; j <= d[i].first; j++)
        cnt += bool((1 << (j % 5)) & k);
      res += min(cnt, d[i].second - d[i - 1].second);
    }
    if (res < nn / 5 * __builtin_popcount(k)) return printf("unfair\n"), 0;
  }
  printf("fair\n");
  return 0;
}
