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

ll mod=1e9+7;
vector<vector<int> > adjl(maxn);
int vis[maxn];


int main(){
 int n;
 cin>>n;
 vector<int> a(n);
 int f2=0;
vector<int> arr(maxn,0);
 for(int i=0;i<n;i++){
    cin>>a[i];
    arr[a[i]]=1;
    f2=__gcd(f2,a[i]);
 }
int f1=1;

 sort(a.begin(),a.end());
 for(int i=2;i<=maxn;i++){
        int ct=0;
    for(int j=i;j<=maxn;j+=i){
        ct+=arr[j];
    }
    f1=f1&(ct<=1);
 }

 //cout<<f2<<endl;
 if(f1==1){
    cout<<"pairwise coprime"<<endl;
 }
 else if(f2==1){
    cout<<"setwise coprime"<<endl;
 }
 else{
    cout<<"not coprime"<<endl;
 }

return 1;

}
