#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)
int main()
{
  int n,i,x,y,j;
  cin>>n;
  int a[n+3];
  for(i=0;i<n;i++)
  {
    cin>>a[i];
  }
  int f=0;
  for(i=0;i<n-1;i++)
  {
    for(j=i+1;j<n;j++)
    {
      if((__gcd(a[i],a[j]))!=1)
      {
        //vcout<<i<<" "<<j<<endl;
        f=1;
        break;
      }
    }
    if(f) break;
  }
  if(f==0) 
  {
   cout<<"pairwise coprime"<<endl;
   return 0;
  }
  int g=a[0];
  for(i=1;i<n;i++)
  {
     g=__gcd(g,a[i]);
  }
  if(g==1)
  {
    cout<<"setwise coprime"<<endl;
    return 0;
  }
  cout<<"not coprime"<<endl;
  return 0;
}