#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int from, to, cap, flow, index;
  Edge(int from, int to, int cap, int flow, int index)
      : from(from), to(to), cap(cap), flow(flow), index(index) {}
  long long rcap() { return cap - flow; }
};
struct Dinic {
  int N;
  vector<vector<Edge> > G;
  vector<vector<Edge *> > Lf;
  vector<int> layer;
  vector<int> Q;
  Dinic(int N) : N(N), G(N), Q(N) {}
  void AddEdge(int from, int to, int cap) {
    if (from == to) return;
    G[from].push_back(Edge(from, to, cap, 0, G[to].size()));
    G[to].push_back(Edge(to, from, 0, 0, G[from].size() - 1));
  }
  long long BlockingFlow(int s, int t) {
    layer.clear();
    layer.resize(N, -1);
    layer[s] = 0;
    Lf.clear();
    Lf.resize(N);
    int head = 0, tail = 0;
    Q[tail++] = s;
    while (head < tail) {
      int x = Q[head++];
      for (int i = 0; i < G[x].size(); i++) {
        Edge &e = G[x][i];
        if (e.rcap() <= 0) continue;
        if (layer[e.to] == -1) {
          layer[e.to] = layer[e.from] + 1;
          Q[tail++] = e.to;
        }
        if (layer[e.to] > layer[e.from]) {
          Lf[e.from].push_back(&e);
        }
      }
    }
    if (layer[t] == -1) return 0;
    long long totflow = 0;
    vector<Edge *> P;
    while (!Lf[s].empty()) {
      int curr = P.empty() ? s : P.back()->to;
      if (curr == t) {
        long long amt = P.front()->rcap();
        for (int i = 0; i < P.size(); ++i) {
          amt = min(amt, P[i]->rcap());
        }
        totflow += amt;
        for (int i = P.size() - 1; i >= 0; --i) {
          P[i]->flow += amt;
          G[P[i]->to][P[i]->index].flow -= amt;
          if (P[i]->rcap() <= 0) {
            Lf[P[i]->from].pop_back();
            P.resize(i);
          }
        }
      } else if (Lf[curr].empty()) {
        P.pop_back();
        for (int i = 0; i < N; ++i)
          for (int j = 0; j < Lf[i].size(); ++j)
            if (Lf[i][j]->to == curr) Lf[i].erase(Lf[i].begin() + j);
      } else {
        P.push_back(Lf[curr].back());
      }
    }
    return totflow;
  }
  long long GetMaxFlow(int s, int t) {
    long long totflow = 0;
    while (long long flow = BlockingFlow(s, t)) totflow += flow;
    return totflow;
  }
};
pair<int, int> h[10005];
int main() {
  int n, b, q;
  scanf("%d %d %d", &n, &b, &q);
  for (int i = 0; i < q; i++) {
    scanf("%d %d", &h[i].first, &h[i].second);
  }
  sort(h, h + q);
  h[q].first = b;
  h[q].second = n;
  q++;
  Dinic G(7 + q);
  int s = q + 5;
  int t = q + 6;
  G.AddEdge(s, q, n / 5);
  G.AddEdge(s, q + 1, n / 5);
  G.AddEdge(s, q + 2, n / 5);
  G.AddEdge(s, q + 3, n / 5);
  G.AddEdge(s, q + 4, n / 5);
  for (int i = 0; i < q; i++) {
    int all = h[i].second;
    if (i) all -= h[i - 1].second;
    if (all < 0) {
      cout << "unfair" << endl;
      return 0;
    }
    G.AddEdge(i, t, all);
    int d[5] = {0};
    int st = 1;
    if (i > 0) st = h[i - 1].first + 1;
    for (int j = st; j <= h[i].first; j++) {
      d[j % 5]++;
    }
    for (int j = 0; j < 5; j++) {
      G.AddEdge(q + j, i, d[j]);
    }
  }
  int r = G.GetMaxFlow(s, t);
  if (r == n) {
    cout << "fair" << endl;
  } else
    cout << "unfair" << endl;
}
