#include<bits/stdc++.h>
#define mod 1000000007
#define int long long int
#define phi 1.6180339
#define rep(i,n) for(auto i=0;i<(n);i++)
#define endl "\n"
#define For(i,a,b) for(auto i=(a);i<(b);i++)
#define op1 cin.tie(NULL)
#define op2 cout.tie(NULL)
#define op3 std::ios_base::sync_with_stdio(false)
#define MAXX 1000001
using namespace std;  
vector<int> list_factor(MAXX);
void solve()
{
  list_factor[1]=1;
  for(int i=2;i<=MAXX;i++)
  {
    if(!list_factor[i])
    {
      list_factor[i]=i;
      for(int j=2*i;j<=MAXX;j+=i) if(list_factor[j]==0) list_factor[j]=i;
    }
  }
}
void trozen()
{
  solve();
  int n;
  cin>>n;
  vector<int> v1(MAXX);
  vector<int> arr(n);
  bool flag=true;
  int temp;
  rep(i,n)
  {
    cin>>temp;
    arr[i]=temp;
    v1[list_factor[temp]]++;
    if(v1[list_factor[temp]]>1) flag=false;
  }
  if(flag)
  {
    cout<<"pairwise coprime"<<endl;
    return;
  }
  int gcd=arr[0];
  rep(i,n-1) gcd=__gcd(gcd,arr[i+1]);
  if(gcd==1)
  {
    cout<<"setwise coprime"<<endl;
    return;
  }
  cout<<"not coprime"<<endl;
}
int32_t main()
{
    op1;op2;op3;
    /*#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif*/
    trozen();
    return 0;
}
