#include <bits/stdc++.h>

using namespace std;

bool isPrime(int n)
{
    int k = floor(sqrt(n));
    for (int i=2; i<k; i++) if (k%i == 0) return false;
    return true;
}

int main()
{
    int n;
    cin>>n;
    vector<int> a(n);
    vector<bool> dp(1000000, false);    
    
    vector<int> prime;
    for (int i=2; i<1000000; i++) {
        if (isPrime(i)) prime.push_back(i);
    }
    int s = prime.size();
    int gcd;
    bool ok = false;
    for (int i=0; i<n; i++){
        cin>>a[i];

        if (i == 0) gcd = a[0];
        else gcd = __gcd(gcd, a[i]);

        if (!ok) {
            for (int j = 0; j<s; j++) {
                if (prime[j] > a[i]) break;
                if (a[i] % prime[j] == 0) {
                    if (dp[prime[j]]) {
                        ok = true;
                        break;
                    }
                    else dp[prime[j]] = true;
                }
            }
        }
        
    }
    if (gcd > 1) cout << "not coprime" << '\n';
    else if (ok) cout << "setwise coprime" << '\n';
    else cout << "pairwise coprime" << '\n';
    return 0;
}