#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  vector<pair<int, int> > v;
  int n, b, q;
  cin >> n >> b >> q;
  v.push_back(make_pair(0, 0));
  while (q--) {
    int a, b;
    scanf("%d%d", &a, &b);
    v.push_back(make_pair(a, b));
  }
  v.push_back(make_pair(b, n));
  sort(v.begin(), v.end());
  bool flag = false;
  int cnt = 0, ans;
  for (int j = 1; j < 32; j++) {
    ans = 0;
    for (int i = 1; i < v.size(); i++) {
      int x = v[i].first - v[i - 1].first;
      int y = v[i].second - v[i - 1].second;
      if (y < 0 || y > x) {
        flag = true;
        break;
      }
      cnt = 0;
      for (int k = 0; k < 5; k++)
        if (j & (1 << k))
          cnt += (v[i].first + k) / 5 - (v[i - 1].first + k) / 5;
      ans += min(cnt, y);
    }
    if (ans < __builtin_popcount(j) * n / 5) {
      flag = true;
      break;
    }
  }
  if (flag)
    printf("unfair");
  else
    printf("fair");
  return 0;
}
