#include<bits/stdc++.h>

using namespace std;

#define debug(x) cout << '[' << #x << " is: " << x << "] " << '\n';
#define imod(a , n) (a % n + n ) % n

#define fastio ios_base::sync_with_stdio(false);cin.tie(0);
#define inF freopen("milkvisits.in","r",stdin );
#define outF freopen("milkvisits.out" , "w" , stdout ) ;
#define sor(v) sort(v.begin() , v.end());
#define print(v) for(auto f : v ) cout << f << " " ;
#define rsor(v) sort(v.rbegin() , v.rend());
#define rev(v) reverse(v.begin() , v.end());
#define lp(i , n) for(int x = i ; x < n ; x ++)
#define ll long long
#define read(arr , x , n) for(int i = x ; i < n ; i ++ )cin >> arr[i];
#define int long long
const double eps = 1e-6 , PI = acos(-1) ;
const long long OO = 1e18 ;
const ll N = 1e6 + 5  , oo = 1e9 + 1  , M = 2000002, mod = 1e9 + 7 , K = 12;
int n , notprime[N] ;
vector<int> fac [N];


void haha(){
    notprime[1] = 1 ;
    for(int i = 2 ; i * i <= N ; i += (i == 2 ? 1  : 2)){
        if(notprime[i])
            continue ;

        for(int j = i ; j <= N ; j += i)
            notprime[j] ++ , fac[j].push_back(i);
    }

}
//

int32_t main(){
    // inF;outF;
    //fastio;
    // Dont Forget memset
   haha();

   cin >> n ;
    map<int , int > cnt ;
    vector<int> v(n);  int gcd = 0 ;
    for(auto &it : v){
        cin >> it ;
        gcd = __gcd(gcd , it);
    }
    if(gcd - 1)cout << "not coprime";
    else{
        for(auto f : v){
            if(fac[f].empty() && !notprime[f])
                fac[f].push_back(f);
            for(auto it : fac[f]){
                cnt [it] ++ ;
                if(cnt[it] > 1){
                    cout << "setwise coprime";
                    return 0 ;
                }
            }
        }
        cout << "pairwise coprime";
    }

}
