#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
#define int ll
const int N=1e6+3;
vector<int> p;
vector<bool> prime(N,1);
bool f[N];
int32_t main()
{
  #ifndef ONLINE_JUDGE
  freopen("in","r",stdin);
  freopen("out","w",stdout);
  #endif
  prime[1]=prime[0]=0;
  for(int i=2;i<N;i++)
  {
    if(!prime[i])continue;
    for(int j=i*i;j<N;j+=i)prime[j]=0;
  }
  for(int i=0;i<N;i++)if(prime[i])p.push_back(i);

 int n;
 cin>>n;
 bool pairwise=1,setwise=1;
 vector<int> a(n);
 for(int &i:a)cin>>i;

  for(int num:a)
  {
    for(int i=0;i<p.size() and p[i]<=num;i++)
    {
      if(num%p[i]==0){if(f[p[i]]){pairwise=0;break;}else {num/=p[i];f[p[i]]=1;}}
    }
  }
  //for(auto i:a)cout<<i<<" ";
  int g=a[0];
  for(int i:a)
  {
   // cout<<i<<" "<<g<<"\n";
    g=__gcd(g,i);

  }
  //cout<<g;
  if(g!=1)setwise=0;


if(pairwise)printf("pairwise coprime");
else if(!pairwise and setwise)printf("setwise coprime");
else printf("not coprime");




}