#include <bits/stdc++.h>
const long long INF = 4e18L + 1;
const int IINF = 2e9 + 1;
const int limit = 1048576;
using namespace std;
bool bs = false;
struct Dinic {
  struct Din_edge {
    int v;
    long long cap;
    int rev_ind;
  };
  int n, source, sink;
  vector<int> starte, d;
  vector<vector<Din_edge> > nei;
  inline bool bfs() {
    d = vector<int>(n + 1, -1);
    d[source] = 0;
    vector<int> q(1, source);
    for (long long i = (long long)0; i < (long long)q.size(); i++) {
      int v = q[i];
      for (auto w : nei[v])
        if (d[w.v] == -1 && w.cap) {
          q.push_back(w.v);
          d[w.v] = d[v] + 1;
        }
    }
    return d[sink] != -1;
  }
  long long dfs(int v, long long mincap) {
    if (!mincap || v == sink) return mincap;
    long long fp = 0;
    for (long long i = (long long)starte[v]; i < (long long)nei[v].size();
         i++) {
      if (!mincap)
        break;
      else
        starte[v] = i;
      Din_edge& edge = nei[v][i];
      int w = nei[v][i].v;
      if (d[w] == d[v] + 1) {
        long long f = dfs(w, min(mincap, edge.cap));
        mincap -= f;
        fp += f;
        edge.cap -= f;
        nei[edge.v][edge.rev_ind].cap += f;
      }
    }
    return fp;
  }
  Dinic(int n, int source, int sink)
      : n(n), source(source), sink(sink), nei(n + 1) {}
  long long flow() {
    long long maxflow = 0;
    while (bfs()) {
      starte = vector<int>(n + 1, 0);
      maxflow += dfs(source, INF);
    }
    return maxflow;
  }
  void add_edge(int from, int to, long long capacity, long long cap2 = 0) {
    Din_edge e1 = (Din_edge){to, capacity, (int)((nei[to]).size())},
             e2 = (Din_edge){from, cap2, (int)((nei[from]).size())};
    nei[from].push_back(e1);
    nei[to].push_back(e2);
  }
  vector<int> find_source_cc() {
    bfs();
    vector<int> ans;
    for (int i = 0; i <= n; i++)
      if (d[i] != -1) ans.push_back(i);
    return ans;
  }
  void wypisz() {
    for (int i = 1; i <= n; i++) {
      cout << i << ": ";
      for (auto el : nei[i]) cout << "(" << el.v << " " << el.cap << ") ";
      cout << endl;
    }
  }
};
int ile(int reszta, int a, int b) {
  int wyn = 0;
  for (int i = a; i <= b; i++)
    if (i % 5 == reszta) wyn++;
  return wyn;
}
int main() {
  int n, b, q;
  cin >> n >> b >> q;
  vector<pair<int, pair<int, int> > > V;
  V.push_back({1, {b, n}});
  while (q--) {
    pair<int, pair<int, int> > t;
    cin >> t.second.first >> t.second.second;
    t.first = 1;
    V.push_back(t);
  }
  sort((V).begin(), (V).end());
  V.resize(distance(V.begin(), unique((V).begin(), (V).end())));
  for (int i = 0; i < (int)((V).size()) - 1; i++)
    if (V[i].second.first == V[i + 1].second.first) {
      cout << "unfair" << endl;
      return 0;
    }
  for (int i = (int)((V).size()) - 1; i > 0; i--) {
    V[i].first = V[i - 1].second.first + 1;
    V[i].second.second -= V[i - 1].second.second;
    if (V[i].second.second < 0) {
      cout << "unfair" << endl;
      return 0;
    }
  }
  Dinic D(7 + (int)((V).size()), 1, 7 + (int)((V).size()));
  for (int i = 2; i <= 6; i++) D.add_edge(1, i, n / 5);
  for (int i = 7; i < 7 + (int)((V).size()); i++)
    D.add_edge(i, 7 + (int)((V).size()), V[i - 7].second.second);
  for (int i = 2; i < 7; i++)
    for (int j = 7; j < 7 + (int)((V).size()); j++) {
      D.add_edge(i, j, ile(i - 2, V[j - 7].first, V[j - 7].second.first));
    }
  if (D.flow() == n) {
    cout << "fair";
  } else
    cout << "unfair";
  return 0;
}
