#include<bits/stdc++.h>
using namespace std;
#define int  long long int
#define fi first
#define se second
#define pb push_back
#define soo(v) sort(v.rbegin(),v.rend())
#define so(v) sort(v.begin(),v.end())
#define lb(v,x) lower_bound(v.begin(),v.end(),x)
#define ub(v,x) upper_bound(v.begin(),v.end(),x)
//#define endl '\n'
#define dbv(v) cout<<endl;cout<<#v<<"-->> ";for(auto it:v){cout<<it<<" ";}cout<<endl;
#define dbm(m)cout<<endl;cout<<#m<<"-->> ";for(auto it:m){cout<<it.fi<<" "<<it.se<<endl;}
#define dbs(s)cout<<endl;cout<<#s<<"-->> ";for(auto it:s){cout<<it<<" ";}cout<<endl;
#define mod 1000000007
#define db1(x) cout<<#x<<"="<<x<<endl;
#define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<endl;
#define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<endl;
#define mx 1e18
#define mxe(v) *max_element(v.begin(),v.end())
#define mne(v)  *min_element(v.begin(),v.end())
#define double long double
#define io std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
int kk=0;vector<vector<int>>v;vector<bool>vis;
int32_t main()
{
  int n;cin>>n;
  vector<int>a(n);unordered_set<int>ss;
  for(int i=0;i<n;i++){cin>>a[i];ss.insert(a[i]);}
    int setgcd;
  for(int i=0;i<n;i++)
  {
    if(i==0)setgcd=a[i];
    else
    {
      setgcd=__gcd(setgcd,a[i]);
    }
  }int uu=0;
  for(int i=2;i<=sqrt(1000000);i++)
  {
    int cnt=0;
    for(int j=2*i;j<=1000000;j+=i)
    {
         if(ss.find(j)!=ss.end())cnt++;
    }
    if(cnt>1)
    {
      if(setgcd==1)
      {
        cout<<"setwise coprime"<<endl;uu=1;break;
      }
      else
      {
        cout<<"not coprime"<<endl;uu=1;break;
      }
    }
  }
  if(uu==0)
  {
    cout<<"pairwise coprime"<<endl;
  }

}