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

int main()
{
    ll int n, i, p, gc, lc;
    cin>>n;
    ll int arr[n];
    for(i=0; i<n; i++){
        cin>>arr[i];
    }
    
    for(i=1, gc=arr[0], lc=arr[0], p=arr[0]; i<n; i++){
        gc = __gcd(gc, arr[i]);
        lc= ((lc*arr[i])/(__gcd(lc,arr[i]))%1000000007);
        p = (p*arr[i])%1000000007;
    }
    if(gc!=1) cout<<"not coprime";
    else{
        if(lc==p) cout<<"pairwise coprime";
        else cout<<"setwise coprime";
    }
    return 0;
}
