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

ll       a[1000001];
bool   pre[1000001];
bool prime[1000001];

int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    ll n;
    cin>>n;
    
    for(int i=0;i<n;i++)cin>>a[i], pre[a[i]]=true;
    
    memset(prime,true,1000001);
    ll ans=0;
    for(int i=2;i<=1000;i++)
        {
            ll cnt=0;
             if(prime[i])
             {
                 for(int j=i*i;j<=1000000;j+=i)
                 {
                     if(pre[j])cnt++;
                     prime[j]=false;
                 }
                ans=max(ans, cnt);   
             }
        }
    
    if(ans<=1)
        cout<<"pairwise coprime"<<endl;
   
   else {
    ll ans=a[0];
    for(int i=1;i<n;i++)
        ans=__gcd(a[i],ans);
    
    if(ans==1)
        cout<<"setwise coprime"<<endl;
    else
        cout<<"not coprime"<<endl;
   }
   	return 0;
}
