Problem: One day Igor K. stopped programming and took up math. One late autumn evening he was sitting at a table reading a book and thinking about something. 

The following statement caught his attention: "Among any six people there are either three pairwise acquainted people or three pairwise unacquainted people"

Igor just couldn't get why the required minimum is 6 people. "Well, that's the same for five people, too!" — he kept on repeating in his mind. — "Let's take, say, Max, Ilya, Vova — here, they all know each other! And now let's add Dima and Oleg to Vova — none of them is acquainted with each other! Now, that math is just rubbish!"

Igor K. took 5 friends of his and wrote down who of them is friends with whom. Now he wants to check whether it is true for the five people that among them there are either three pairwise acquainted or three pairwise not acquainted people.

Input

The first line contains an integer m (0 ≤ m ≤ 10), which is the number of relations of acquaintances among the five friends of Igor's.

Each of the following m lines contains two integers ai and bi (1 ≤ ai, bi ≤ 5;ai ≠ bi), where (ai, bi) is a pair of acquainted people. It is guaranteed that each pair of the acquaintances is described exactly once. The acquaintance relation is symmetrical, i.e. if x is acquainted with y, then y is also acquainted with x.

Output

Print "FAIL", if among those five people there are no either three pairwise acquainted or three pairwise unacquainted people. Otherwise print "WIN".

Examples

Input

4
1 3
2 3
1 4
5 3


Output

WIN


Input

5
1 2
2 3
3 4
4 5
5 1


Output

FAIL

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
static const auto fast_io = [] {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  return nullptr;
}();
const int mod = 1e9 + 7;
long long int mpower(long long int a, long long int b) {
  long long int res = 1;
  a %= mod;
  while (b) {
    if (b & 1) res *= a, res %= mod;
    a *= a, a %= mod;
    b >>= 1;
  }
  return res;
}
long long int power(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
vector<long long int> fact(1e5 + 1, 1);
void fillfact() {
  fact[0] = fact[1] = 1;
  for (int i = 1; i <= 1e5; i++) fact[i] = (i * fact[i - 1]) % mod;
}
long long int pr[1000001] = {0};
void isprime() {
  pr[0] = 1;
  pr[1] = 1;
  for (long long int a = 2; a * a <= 1000001; a++) {
    if (!pr[a]) {
      for (long long int b = a * a; b < 1000001; b += a) {
        pr[b] = 1;
      }
    }
  }
}
long long int nCr(int f, int hf) {
  long long int a = fact[f];
  long long int b = fact[hf];
  b = (b % mod) * (b % mod);
  b %= mod;
  b = mpower(b, mod - 2);
  long long int ans = ((a % mod) * (b % mod)) % mod;
  return ans;
}
vector<long long int> parent;
vector<long long int> ranks;
void make_sets(long long int n) {
  parent.clear();
  ranks.clear();
  ranks.resize(n);
  parent.resize(n);
  for (int i = 0; i < n; i++) {
    parent[i] = i;
    ranks[i] = 0;
  }
}
long long int find_sets(long long int v) {
  if (parent[v] == v)
    return v;
  else
    return parent[v] = find_sets(parent[v]);
}
bool union_set(long long int a, long long int b) {
  a = find_sets(a);
  b = find_sets(b);
  if (a != b) {
    if (ranks[a] < ranks[b])
      swap(a, b);
    else if (ranks[a] == ranks[b])
      ranks[a]++;
    parent[b] = a;
    return false;
  } else
    return true;
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> adj(6);
  long long int a, b;
  for (int i = 1; i <= n; i++) {
    cin >> a >> b;
    adj[a]++;
    adj[b]++;
  }
  bool flag = false;
  for (int i = 1; i < 6; i++) {
    if (adj[i] >= 3 || adj[i] <= 1) {
      cout << "WIN" << endl;
      flag = true;
      break;
    }
  }
  if (!flag) cout << "FAIL" << endl;
  return 0;
}