#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
inline long long read() {
  long long X = 0, w = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    w |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
  return w ? -X : X;
}
const int MAXN = 300000, MAXM = 300000, inf = 1e9;
struct Edge {
  int v, c, f, nx;
  Edge() {}
  Edge(int v, int c, int f, int nx) : v(v), c(c), f(f), nx(nx) {}
} E[MAXM];
int G[MAXN], cur[MAXN], pre[MAXN], dis[MAXN], gap[MAXN], sz;
void init() {
  sz = 0;
  memset(G, -1, sizeof(G));
}
void link(int u, int v, int c) {
  E[sz] = Edge(v, c, 0, G[u]);
  G[u] = sz++;
  E[sz] = Edge(u, 0, 0, G[v]);
  G[v] = sz++;
}
bool bfs(int S, int T) {
  static int Q[MAXN];
  memset(dis, -1, sizeof(dis));
  dis[S] = 0;
  Q[0] = S;
  for (int h = 0, t = 1, u, v, it; h < t; ++h) {
    for (u = Q[h], it = G[u]; ~it; it = E[it].nx) {
      if (dis[v = E[it].v] == -1 and E[it].c > E[it].f) {
        dis[v] = dis[u] + 1;
        Q[t++] = v;
      }
    }
  }
  return dis[T] != -1;
}
int dfs(int u, int T, int low) {
  if (u == T) {
    return low;
  }
  int ret = 0, tmp, v;
  for (int &it = cur[u]; ~it and ret < low; it = E[it].nx) {
    if (dis[v = E[it].v] == dis[u] + 1 and E[it].c > E[it].f) {
      if (tmp = dfs(v, T, min(low - ret, E[it].c - E[it].f))) {
        ret += tmp;
        E[it].f += tmp;
        E[it ^ 1].f -= tmp;
      }
    }
  }
  if (!ret) {
    dis[u] = -1;
  }
  return ret;
}
int dinic(int S, int T) {
  int maxflow = 0, tmp;
  while (bfs(S, T)) {
    memcpy(cur, G, sizeof(G));
    while (tmp = dfs(S, T, inf)) maxflow += tmp;
  }
  return maxflow;
}
int n, b, q;
pair<int, int> p[MAXN];
int main() {
  init();
  memset(p, 0, sizeof(p));
  cin >> n >> b >> q;
  for (int i = 1; i <= q; i++) {
    cin >> p[i].first >> p[i].second;
  }
  q++;
  p[q].first = b, p[q].second = n;
  sort(p + 1, p + 1 + q);
  for (int i = 1; i <= q; i++) {
    if (p[i].second < p[i - 1].second) {
      return puts("unfair");
    }
  }
  int S = 0, T = q + 7;
  for (int i = 1; i <= 5; i++) {
    link(S, i, n / 5);
  }
  for (int i = 1; i <= q; i++) {
    link(i + 5, T, p[i].second - p[i - 1].second);
    for (int j = 1; j <= 5; j++) {
      int num1 = p[i].first / 5 + (p[i].first % 5 >= j);
      int num2 = p[i - 1].first / 5 + (p[i - 1].first % 5 >= j);
      link(j, i + 5, num1 - num2);
    }
  }
  if (dinic(S, T) != n) {
    puts("unfair");
  } else {
    puts("fair");
  }
  return 0;
}
