
#include <bits/stdc++.h>
#define ll long long int

using namespace std;

int main(){

    ll n;
    cin>>n;
    ll a[n];
    for(ll i=0;i<n;i++)cin>>a[i];
    ll g=a[0],k=a[0],check=1;
    for(ll i=1;i<n;i++){
        g=__gcd(g,a[i]);
        if(__gcd(k,a[i])!=1)
            check=0;
    }

    if(check==1)
        cout<<"pairwise coprime";
    else if(g==1)
        cout<<"setwise coprime";
    else
        cout<<"not coprime";

    return 0;
}
