#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool prime[2000010];
ll high[2000010];
int main()
{
    ll t=1;
    while(t--)
    {
        ll n;
        cin>>n;
        ll k,a[n+1],l;

    memset(prime, true, sizeof(prime));
     for(int i=0;i<=2000000;i++)
         high[i]=i;
    for (int p=2; p*p<=2000000; p++)
    {
        if (prime[p] == true)
        {
            for (int i=p*p; i<=2000000; i += p)
           {
             prime[i] = false;
             high[i]=p;
           }
        }
    }
    int i;
        map<int,int>mp;
        for(i=0;i<n;i++)
            {cin>>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(int p=high[a[i]];p<=1000000;p+=high[a[i]])
               {
                      if(mp[a[i]]>1)
                      {
                          flag=1;
                          break;
                      }
                      else 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;
    }

}
