#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define Yes cout<<"Yes"<<endl 
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl 
#define no cout<<"no"<<endl
#define vec(a,y,x)  vector<vector<char>> a (y,vector<char>(x))
const double PI=3.14159265358979323846;
const in MOD = 1000000007;
const in INF=1e18+7;
const int inf=1e9+7;
const vector<int> dx={1,0,-1,0};
const vector<int> dy={0,1,0,-1};

vector<int> Eratosthenes( const int N )
{
    std::vector<bool> is_prime( N + 1 );
    for( int i = 0; i <= N; i++ )
    {
        is_prime[ i ] = true;
    }
    std::vector<int> P;
    for( int i = 2; i <= N; i++ )
    {
        if( is_prime[ i ] )
        {
            for( int j = 2 * i; j <= N; j += i )
            {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}

int main(){
  in n;
  cin>>n;
  vector<in> a(n);
  rep(i,n)
    cin>>a.at(i);
  
  //setrwise comprime かどうかの判定
  bool sjudge=false;
  in d = a.at(0);
  rep(i,n-1){
    d=gcd(d,a.at(i+1));
    if(d==1) break;
  }
  if(d!=1){
    cout<<"not coprime"<<endl;
    return 0;
  }
  
  //pairrwise comprime かどうかの判定
  bool pjudge = true;
  
  int N=1000000;
  vector<int> prime;
  for( const auto &x: Eratosthenes( N ) )
    prime.push_back(x);
  int m =prime.size();
  if(n>m){
    pjudge = false;
    cout<<"setwise coprime"<<endl;
    return 0;
  }
  int dame=0;
  rep(i,m){
    dame=0;
    rep(j,n){
      if(a.at(j)%prime.at(i)==0)
        dame++;
      if(dame>1){
        cout<<"setwise coprime"<<endl;
        return 0;
      }
    }
  }
  cout<<"pairwise coprime"<<endl;
}