OIG XX - pod

// https://szkopul.edu.pl/problemset/problem/WH4hoeCGF2NEfw_JJTfWIomi/site/?key=statement

#include <bits/stdc++.h>

// #define GARY_DBG
#define GARY_LIB

constexpr int sizik = 1000 * 1001;

#define ar std::array

typedef std::vector<std::vector<int>> _kra;

void solve() {
    int n;
    std::cin >> n;

    std::vector<int> v(n);
    for (auto& a : v) {
        std::cin >> a;
    }

    bool isGood1 = false, isGood2 = false;
    for (const auto& a : v) {
        if (a % 2 == 0) isGood1 = true;
        if (a % 3 == 0) isGood2 = true;
    }

    if (isGood1 && isGood2) {
        std::cout << "TAK\n";
    } else {
        std::cout << "NIE\n";
    }
}

int32_t main() {
#ifndef GARY_DBG
    std::ios_base::sync_with_stdio(0);
    std::cin.tie(0);
    std::cout.tie(0);
#endif

    int t = 1;
    // std::cin >> t;

    for (; t > 0; t--) {
        solve();
    }

    return 0;
}