#include <bits/stdc++.h>
using namespace std;
int read() {
  char x = getchar();
  int u = 0, fg = 0;
  while (!isdigit(x)) {
    if (x == '-') fg = 1;
    x = getchar();
  }
  while (isdigit(x)) {
    u = (u << 3) + (u << 1) + (x ^ 48);
    x = getchar();
  }
  return fg ? -u : u;
}
const int maxx = 2e5 + 10, inf = 1e9;
int n, b, q, s, t, be[maxx], ne[maxx], to[maxx], w[maxx], num[maxx][5],
    now[maxx], dep[maxx], e = 1, cnt = 5;
pair<int, int> a[maxx];
void add(int x, int y, int z) {
  to[++e] = y;
  ne[e] = be[x];
  be[x] = e;
  w[e] = z;
}
bool bfs() {
  queue<int> q;
  q.push(s);
  for (int i = 1; i <= cnt; ++i) dep[i] = 0;
  dep[s] = 1;
  dep[t] = 0;
  now[s] = be[s];
  while (!q.empty()) {
    int id = q.front();
    q.pop();
    for (int i = be[id]; i; i = ne[i]) {
      int go = to[i];
      if (!dep[go] && w[i] > 0) {
        dep[go] = dep[id] + 1;
        now[go] = be[go];
        q.push(go);
      }
    }
  }
  return dep[t] > 0;
}
int dfs(int id, int mini) {
  if (id == t || !mini) return mini;
  int flow, ret = 0;
  for (int &i = now[id]; i; i = ne[i]) {
    int go = to[i];
    if (w[i] > 0 && dep[go] == dep[id] + 1 &&
        (flow = dfs(go, min(w[i], mini)))) {
      if (!flow) dep[go] = inf;
      w[i] -= flow;
      w[i ^ 1] += flow;
      ret += flow;
      mini -= flow;
    }
    if (!mini) return ret;
  }
  return ret;
}
int dinic() {
  int ans = 0, tmp;
  while (bfs()) {
    tmp = dfs(s, inf);
    if (!tmp) break;
    ans += tmp;
  }
  return ans;
}
int main() {
  n = read();
  b = read();
  q = read();
  for (int i = 1; i <= b; ++i) {
    for (int j = 0; j <= 4; ++j) num[i][j] = num[i - 1][j];
    ++num[i][i % 5];
  }
  for (int i = 1; i <= q; ++i) {
    a[i].first = read();
    a[i].second = read();
  }
  a[q + 1].first = b;
  a[q + 1].second = n;
  sort(a + 1, a + q + 2);
  s = 99999;
  t = 100000;
  for (int i = 1; i <= 5; ++i) {
    add(s, i, n / 5);
    add(i, s, 0);
  }
  for (int i = 1; i <= q + 1; ++i) {
    int C = a[i].second - a[i - 1].second, l = a[i - 1].first + 1,
        r = a[i].first;
    if (C > r - l + 1 || C < 0) {
      puts("unfair");
      return 0;
    }
    add(++cnt, t, C);
    add(t, cnt, 0);
    for (int k = 0; k <= 4; ++k) {
      add(k + 1, cnt, num[r][k] - num[l - 1][k]);
      add(cnt, k + 1, 0);
    }
  }
  if (dinic() == n)
    puts("fair");
  else
    puts("unfair");
  return 0;
}
