#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;

const int mod=1e9+7;
const int inf=-1;
const int sz=1e6;

#define pi acos(-1)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define gap ' '
#define lb lower_bound
#define ub upper_bound
#define SIN(x) sin(x * pi / 180.0)
#define COS(x) cos(x * pi / 180.0)
#define clr(x) memset(x,0,sizeof(x))
#define all(x) sort(x.begin(),x.end())
#define rall(x) reverse(x.begin(),x.end())
#define dbg puts("finding wrong")
#define case(x,y) printf("Case %lld: %lld\n",++x,y)
#define fastio ios::sync_with_stdio(false);cin.tie(0)

ll ar[sz+2];
map<ll,ll>cnt;


int main()
{
  fastio;
  ll  i, n, m, g=0, cur, c=0;
  
  cin>>n;
  
  for(i=0; i<n; i++)
  {
      cin>>ar[i];
      cnt[ar[i]]++;
      g=__gcd(g,ar[i]);
  }
  sort(ar,ar+n);
  ll mx=ar[n-1];
  
  bool f=false;
  for(i=mx; i>=1; i--)
  {
     cur=i;
     c=0;
     while(cur<=mx)
     {
         if(cnt[cur]>=2)
         {
             m=cur;
             f=true;
             break;
         }
         if(cnt[cur]==1)c++;
         
         cur+=i;
         
         if(c==2)
         {
             m=i;
             f=true;
             break;
         }
     }
     if(f)break;
  }
  if(m==1)
  {
      cout<<"pairwise coprime"<<endl;
  }
  else if(m>1 and g==1)
  {
      cout<<"setwise coprime"<<endl;
  }
  else cout<<"not coprime"<<endl;
  
  return 0;
}
