#include <bits/stdc++.h>

using namespace std;

#define IOS ios_base::sync_with_stdio(false);   cin.tie(NULL); cout.tie(NULL);

#define endl "\n";


#define mod 1000000007
#define loop(i,s,n)  for(ll i=s;i<n;i++)
#define test  ll t; cin>>t; while(t--)
#define p push_back
typedef long long ll;
ll gcd(ll a,ll b)
{
    if(a==0)
{return b;}

else
    {return gcd(b%a,a);}
}
int main()
{IOS
ll  n,i,j,k,sum=0,f=0;
cin>>n;
ll a[n]={0};
for(i=0;i<n;i++)
{cin>>a[i];}
ll m[1000001]={0};
for(i=0;i<n;i++)
{k=a[i];
for(j=2;j<=sqrt(k);j++)
{if(k%j==0)
{if(k/j!=j)
{
	m[k/j]++;
m[j]++;
	
}
else{m[j]++;}
m[a[i]]++;	
}}}
ll b=1000001;
sort(m,m+b);
if(m[1000000]>1)
{
    f=1;

}
if(f==0)
{
    cout<<"pairwise coprime";
}

if(f==1)
{
  ll g=a[0];
  for(i=1;i<n;i++)
  {g=gcd(g,a[i]);


  }
        if(g==1)
        {f=2;
            cout<<"setwise coprime";}
        }

        if(f==1)
        {
            cout<<"not coprime";}

return 0;
}
