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;
template <class T>
inline T GCD(T a, T b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  return (b == 0) ? a : GCD(b, a % b);
}
template <class T>
inline T LCM(T a, T b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return a * (b / GCD(a, b));
}
template <class T>
inline bool isPrime(T n) {
  if (n < 2) return false;
  for (T i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
template <class T>
vector<T> Divisor(T num) {
  vector<T> res;
  res.clear();
  for (int i = 1; i <= num / 2; i++)
    if (num % i == 0) res.push_back(i);
  return res;
}
template <class T, class M>
inline T POWER(T x, M y) {
  T temp = 1;
  if (y == 0) return 1;
  for (int i = 1; i <= y; i++) temp *= x;
  return temp;
}
template <class T, class M>
bool Exist(T x, M element) {
  for (int i = 0; i < x.size(); i++)
    if (x[i] == element) return true;
  return false;
}
template <class T>
vector<T> Unique(vector<T> v) {
  T temp;
  vector<T> res;
  res.clear();
  for (int i = 0; i < v.size(); i++) {
    temp = v[i];
    if (Exist(res, temp) == false) res.push_back(temp);
  }
  return res;
}
template <class T>
vector<T> Parse(T temp) {
  vector<T> ans;
  ans.clear();
  T s;
  istringstream is(temp);
  while (is >> s) {
    ans.push_back(s);
  }
  return ans;
}
template <class T>
string toString(T x) {
  stringstream s;
  s << x;
  return s.str();
}
template <class T>
long long toInt(T x) {
  istringstream is(x);
  long long num;
  is >> num;
  return num;
}
template <class T>
inline void checkMin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void checkMax(T &a, T b) {
  if (b > a) a = b;
}
bool isLowerCase(char c) { return (c >= 'a' && c <= 'z'); }
bool isUpperCase(char c) { return (c >= 'A' && c <= 'Z'); }
char toLowerCase(char c) { return (isUpperCase(c) ? (c + 32) : c); }
char toUpperCase(char c) { return (isLowerCase(c) ? (c - 32) : c); }
bool isLetter(char c) { return (isUpperCase(c)) || (isLowerCase(c)); }
bool isDigit(char c) { return (c >= '0' && c <= '9'); }
template <class T>
void print(T ans) {
  for (unsigned int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  cout << endl;
}
template <class T>
void print2(T ans) {
  cout << ans;
  cout << endl;
}
const int MAX = 5;
int graph[MAX][MAX];
int main() {
  int m, a, b;
  bool change = false;
  memset(graph, 0, sizeof(graph));
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    a--;
    b--;
    graph[a][b] = 1;
    graph[b][a] = 1;
  }
  for (int i = 0; i < 5; i++) {
    for (int j = 0; j < 5; j++) {
      for (int k = 0; k < 5; k++) {
        if (i != j && i != k && j != k) {
          if (graph[i][j] == graph[i][k] && graph[i][j] == graph[j][k]) {
            change = true;
            goto skip;
          }
        }
      }
    }
  }
skip:
  cout << (change == true ? "WIN" : "FAIL") << endl;
  return 0;
}