#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  vector<long long> arr;
  long long max = 0;
  for (long long i = 0; i < n; i++) {
    long long temp;
    cin >> temp;
    arr.push_back(temp);
    if (temp > max) max = temp;
  }
  sort(arr.begin(), arr.end());
  long long it = 1;
  max = arr[n - it];
  long long chance = 1;
  long long rem = 1;
  while (rem != 0) {
    cout << chance << " " << rem << " " << it << endl;
    if (max > k) {
      it++;
      if (it > n) break;
      max = arr[n - it];
      continue;
    }
    long long nmax = k / max;
    rem = k - nmax * max;
    k = rem;
    if (nmax % 2 == 1)
      if (chance == 1)
        chance = 1;
      else
        chance = 2;
    else if (chance == 1)
      chance = 2;
    else
      chance = 1;
    it++;
    if (it > n) break;
    max = arr[n - it];
  }
  if (chance == 1) {
    cout << "ONE" << endl;
  } else {
    cout << "TWO" << endl;
  }
  return 0;
}
