/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <bits/stdc++.h>

using namespace std;

int main()
{ int n; cin>>n; int a[n];bool f = 0;int ress=1;int res;

for(int i =0;i<n;i++){
cin>>a[i];
res = a[0];
ress = __gcd(ress,a[i]);
if(ress>1)
f =1;
    ress = a[i];
    res = __gcd(res,a[i]);
}

if(f==0)
cout<<"pairwise coprime";
else{
if(res==1)
   cout<<"setwise coprime";
else 
cout<<"not coprime";
}
    return 0;
}
