#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    int a[n];
    bool flag = true;
    map<int, int> mp;
    for(int j = 0; j < n; ++j) {
        cin >> a[j];

        if(flag) {
            for(long long int i=2 ; i*i<=a[j]; ++i) {
                if(a[j]%i == 0) {
                    mp[i]++;
                    if(mp[i] >= 2) {
                        flag = false;
                        break;
                    }
                    if(i!=1 && i*i!=a[j]) {
                        mp[a[j]/i]++;
                        if(mp[a[j]/i] >= 2) {
                            flag = false;
                            break;
                        }
                    }
                }
            }
            mp[a[j]]++;
            if(mp[a[j]] >= 2) {
                flag = false;
                break;
            }
        }
    }

    int gcd = __gcd(a[0], a[1]);
    for(int i = 2; i < n; ++i) {
        gcd = __gcd(gcd, a[i]);
    }

    if(gcd == 1) {
        if(!flag) {
            cout << "setwise coprime" << '\n';
        } else {
            cout << "pairwise coprime" << '\n';
        }
    } else {
        cout << "not coprime" << '\n';
    }
    
}
