#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10010;
const int SRC = MAXN - 1;
const int SNK = MAXN - 2;
vector<pair<int, pair<int, int>>> edges[MAXN];
pair<int, int> qs[MAXN];
pair<int, int> bck[MAXN];
bool bio[MAXN];
bool dfs(int i) {
  if (i == SNK) return true;
  if (bio[i]) return false;
  bio[i] = true;
  for (int j = 0; j < edges[i].size(); ++j)
    if (edges[i][j].second.first && dfs(edges[i][j].first)) {
      bck[edges[i][j].first] = {i, j};
      return true;
    }
  return false;
}
int flow() {
  int ret = 0, cur, i;
  while (dfs(SRC)) {
    cur = MAXN;
    for (i = SNK; i != SRC; i = bck[i].first) {
      cur = min(cur, edges[bck[i].first][bck[i].second].second.first);
    }
    for (i = SNK; i != SRC; i = bck[i].first) {
      edges[bck[i].first][bck[i].second].second.first -= cur;
      edges[i][edges[bck[i].first][bck[i].second].second.second].second.first +=
          cur;
    }
    ret += cur;
    memset(bio, false, sizeof bio);
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, b, q, i, j;
  int x, y, z;
  cin >> n >> b >> q;
  for (i = 0; i < 5; ++i) {
    edges[SRC].push_back({i, {n / 5, edges[i].size()}});
    edges[i].push_back({SRC, {0, edges[SRC].size() - 1}});
  }
  qs[0] = {0, 0};
  for (i = 1; i <= q; ++i) {
    cin >> x >> y;
    qs[i] = {x, y};
  }
  qs[q + 1] = {b, n};
  sort(qs + 1, qs + q + 1);
  for (i = 1; i <= q + 1; ++i) {
    x = qs[i - 1].first;
    y = qs[i].first;
    z = qs[i].second - qs[i - 1].second;
    if (z < 0) {
      cout << "unfair\n";
      return 0;
    }
    edges[5 + i].push_back({SNK, {z, edges[SNK].size()}});
    edges[SNK].push_back({5 + i, {0, edges[5 + i].size() - 1}});
    for (j = 0; j < 5; ++j) {
      edges[j].push_back({5 + i,
                          {y / 5 + (y % 5 >= j) - (x / 5 + (x % 5 >= j)),
                           edges[5 + i].size()}});
      edges[5 + i].push_back({j, {0, edges[j].size() - 1}});
    }
  }
  cout << (flow() == n ? "fair" : "unfair") << '\n';
}
