#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll c=0,ans=0;
ll vis[200010];
vector<vector<int>>adj(200010);
void dfs(int v)
{
     vis[v]=1;
     c++;
     for(auto i=adj[v].begin();i!=adj[v].end();i++)
     {
         if(vis[*i]==0)
              dfs(*i);


     }
}
int main()
{
    ll t=1;
    //cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;
        ll k,i,a[n+1],l;
        map<int,int>mp;
        for(i=0;i<n;i++)
            {cin>>a[i];
             mp[a[i]]++;
            }

        sort(a,a+n);
          l=a[0];
                for(i=1;i<n;i++)
                    l=__gcd(l,a[i]);
            ll flag=0;
          for(i=0;i<n;i++)
          {
              for(ll p=a[i]*2;p<=2000000;p+=a[i])
              {
                  if(mp[p]>0)
                  {
                      flag=1;
                      break;

                  }

              }
              if(flag==1)
                break;

          }
          if(flag==0)
             cout<<"pairwise coprime"<<endl;
          else if(flag==1&&l==1)
              cout<<"setwise coprime"<<endl;
          else
            cout<<"not coprime"<<endl;
    }

}
