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;
const int MOD = 1000000007;
const long long INF = 1E18;
const double EPS = 1E-10;
template <class T>
T ckmin(T& a, T b) {
  return a = min(a, b);
}
template <class T>
T ckmax(T& a, T b) {
  return a = max(a, b);
}
namespace input {
template <class T1, class T2>
void re(pair<T1, T2>& p);
template <class T>
void re(vector<T>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& x) {
  string t;
  re(t);
  x = stod(t);
}
template <class A, class... As>
void re(A& head, As&... tail) {
  re(head);
  re(tail...);
}
template <class T1, class T2>
void re(pair<T1, T2>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& a) {
  for (int i = (0); i < (((int)(a).size())); i++) re(a[i]);
}
}  // namespace input
using namespace input;
namespace output {
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T>
void pr(const vector<T>& x);
template <class T>
void pr(const set<T>& x);
template <class T1, class T2>
void pr(const map<T1, T2>& x);
template <class T>
void pr(const T& x) {
  cout << x;
}
template <class A, class... As>
void pr(const A& head, const As&... tail) {
  pr(head);
  pr(tail...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("{", x.first, ", ", x.second, "}");
}
template <class T>
void prc(const T& x) {
  pr("{");
  bool fi = 1;
  for (auto& a : x) pr(!fi ? ", " : "", a), fi = 0;
  pr("}");
}
template <class T>
void pr(const vector<T>& x) {
  prc(x);
}
template <class T>
void pr(const set<T>& x) {
  prc(x);
}
template <class T1, class T2>
void pr(const map<T1, T2>& x) {
  prc(x);
}
void ps() { pr("\n"); }
template <class A, class... As>
void ps(const A& head, const As&... tail) {
  pr(head, " ");
  ps(tail...);
}
}  // namespace output
using namespace output;
inline int cmp(double x, double y = 0, double tol = EPS) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int m;
  re(m);
  vector<vector<int> > g(5, vector<int>(5));
  while (m--) {
    int x, y;
    re(x, y);
    x--, y--;
    g[x][y] = g[y][x] = 1;
  }
  for (int k = (0); k < (5); k++)
    for (int i = (k + 1); i < (5); i++)
      for (int j = (i + 1); j < (5); j++)
        if (g[k][i] & g[i][j] & g[k][j] || !g[k][i] & !g[i][j] & !g[k][j]) {
          pr("WIN\n");
          return 0;
        }
  pr("FAIL\n");
}