#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2")
#pragma GCC optimize("trapv")
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " : " << a << endl;
  err(++it, args...);
}
const int INF = 1e9;
struct Dinic {
  int nodes, src, dst;
  vector<int> dist, q, work;
  struct edge {
    int to, rev;
    long long int f, cap;
  };
  vector<vector<edge>> g;
  Dinic(int x) : nodes(x), g(x), dist(x), q(x), work(x) {}
  void add_edge(int s, int t, long long int cap) {
    g[s].push_back((edge){t, (int)(g[t]).size(), 0, cap});
    g[t].push_back((edge){s, (int)(g[s]).size() - 1, 0, 0});
  }
  bool dinic_bfs() {
    fill((dist).begin(), (dist).end(), -1);
    dist[src] = 0;
    int qt = 0;
    q[qt++] = src;
    for (int qh = 0; qh < qt; qh++) {
      int u = q[qh];
      for (long long int i = 0; i < ((int)(g[u]).size()); ++i) {
        edge &e = g[u][i];
        int v = g[u][i].to;
        if (dist[v] < 0 && e.f < e.cap) dist[v] = dist[u] + 1, q[qt++] = v;
      }
    }
    return dist[dst] >= 0;
  }
  long long int dinic_dfs(int u, long long int f) {
    if (u == dst) return f;
    for (int &i = work[u]; i < (int)(g[u]).size(); i++) {
      edge &e = g[u][i];
      if (e.cap <= e.f) continue;
      int v = e.to;
      if (dist[v] == dist[u] + 1) {
        long long int df = dinic_dfs(v, min(f, e.cap - e.f));
        if (df > 0) {
          e.f += df;
          g[v][e.rev].f -= df;
          return df;
        }
      }
    }
    return 0;
  }
  long long int max_flow(int _src, int _dst) {
    src = _src;
    dst = _dst;
    long long int result = 0;
    while (dinic_bfs()) {
      fill((work).begin(), (work).end(), 0);
      while (long long int delta = dinic_dfs(src, INF)) result += delta;
    }
    return result;
  }
};
const int NUM = 10210;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  ;
  int n, b, q;
  cin >> n >> b >> q;
  Dinic elManco(NUM);
  vector<pair<int, int>> v;
  for (long long int i = 0; i < (q); ++i) {
    int upto, qu;
    cin >> upto >> qu;
    v.push_back({upto, qu});
  }
  v.push_back({b, n});
  sort((v).begin(), (v).end());
  for (int i = 0, bef = -1; i < (int)(v).size(); i++) {
    if (v[i].second < bef) {
      cout << "unfair" << endl;
      return 0;
    }
    bef = v[i].second;
  }
  int source = n + 100, sink = n + 101, shift = 6;
  for (int i = 0, bef = 0, lower = 0; i < (int)(v).size(); i++) {
    elManco.add_edge(source, i + shift, v[i].second - bef);
    vector<int> foo(5);
    for (int j = lower + 1; j <= v[i].first; j++) foo[j % 5]++;
    for (int j = 0; j < 5; j++) elManco.add_edge(i + shift, j, foo[j]);
    bef = v[i].second, lower = v[i].first;
  }
  for (int i = 0; i < 5; i++) elManco.add_edge(i, sink, n / 5);
  if (elManco.max_flow(source, sink) == n)
    cout << "fair" << endl;
  else
    cout << "unfair" << endl;
  return 0;
}
