#include<bits/stdc++.h>
using namespace std;
#include<bits/stdc++.h>
using namespace std;
typedef     long long    ll;
typedef     vector<int> vi;
typedef     vector<long long> vl;
typedef     pair<int, int>pi;
typedef     pair<long long, long long>pl;
#define F   first
#define S   second
#define pb  push_back
#define     all(x)      x.begin() , x.end()
#define mp  make_pair
#define       FOR(i,a,b) for(i=a;i<=b;i++)
#define     mem(a)      memset(a , 0 ,sizeof a)
#define     memn(a)     memset(a , -1 ,sizeof a)
ll l=1e18;
int ck[100000];
 void func(ll x)
 {
  ll i;
  for(i=2;i<=x/i;i++)
  {
    if(x%i==0)
    {
      ck[x]++;
      while(x%i==0)
      {
        x=x/i;
      }
    }
  }
 }
int main()
{
  int t;
  t=1;
  //cin >> t;
  while (t--)
  {
   ll n,g,i,j,k,d;
   cin>>n;
   ll a[n+3];
     FOR(i,0,n-1)  cin>>a[i],func(a[i]);
     g=a[0];
     FOR(i,1,n-1)
     {
      g=__gcd(g,a[i]);
     }
  
     int f=0;
     for(i=1;i<n;i++)
     {
        if(ck[i]>1)
        {
          f=1;
          break;
        }
     }
     if(f==0) 
     {
      cout<<"pairwise coprime"<<endl;
      return 0;
     }
     if(g==1)
     {
      cout<<"setwise coprime"<<endl;
      return 0;
     }
     cout<<"not coprime"<<endl;
     return 0;


  }
}