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

int main()
{
    ll int n, i, j, flag=0;
    cin>>n;
    ll int arr[n];
    for(i=0; i<n; i++){
        cin>>arr[i];
    }
    
    for(i=0; i<n-1; i++){
        for(j=i+1; j<n; j++){
            if(__gcd(arr[i],arr[j]) != 1) {
                flag++;
                break;
            }
        }
        if(flag>0) break;
    }
    if(flag==0) cout<<"pairwise coprime";
    else{
        j=arr[0];
        for(i=1; i<n; i++){
            j = __gcd(j, arr[i]);
        }
        if(j==1) cout<<"setwise coprime";
        else cout<<"not coprime";
    }
    return 0;
}