#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pii pair<ll,ll>
#define tii tuple<ll,ll,ll>
#define all(v) (v).begin(),(v).end()
#define ll long long
#define deb(x) cout << #x << "=" << x << endl;
#define ull unsigned long long
#define fastio ios_base::sync_with_stdio(false);cin.tie(nullptr);
#define ld long double
#define mod 1000000007
#define PI 3.141592653589793238
#define phi 1.638
#define eps 1e-9
#define endl "\n"
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;   

map<ll, int> mp;

int main() {
    fastio
    int n;
    cin>>n;
    vector<ll> vec(n);
    for(auto& it : vec) cin>>it;
    sort(all(vec));

    bool pc = true;
    for(int i = 0; i<n && pc; ++i) {
        ll temp = vec[i];
        if(temp%2==0) {
            if(mp[2]) {
                pc = false;
                break;
            }
            mp[2] = 1;
        }
        while(temp%2==0) {
            temp /= 2;
        }
        
        for(ll j = 3; j*j<=temp && pc; j+=2) {
            if(temp%j==0) {
                if(mp[j]) {
                    pc = false;
                    break;
                }
                else {
                    mp[j] = 1;
                }
            }
            while(temp%j==0) {
                temp/=j;
            }
        }

        if(n>2) {
            if(mp[n]) {
                pc = false;
                break;
            }
            mp[n] = 1;
        }
    }

    if(!pc) {
        ll g = vec[0];
        for(int i = 1; i<n; ++i) {
            g = __gcd(g, vec[i]);
        }
        if(g == 1) {
            cout<<"setwise coprime"<<endl;
            return 0;
        }
        else {
            cout<<"not coprime"<<endl;
            return 0;
        }
    }
    cout<<"pairwise coprime"<<endl;
}