#include "bits/stdc++.h"
using namespace std;
#pragma GCC optimize "trapv"
#define pb push_back
#define fi first
#define se second
#define all(container) container.begin(),container.end()
#define fast ios::sync_with_stdio(0); cin.tie(0)
#ifndef ONLINE_JUDGE
#include "debug.cpp"
#endif
#define int long long
const int mod = 1e9+7;  
int power(int a,int b) { if(b==0) return 1; int res = power(a,b/2); if(b&1) return res * res * a; else return res * res; }


int32_t main(){
    
  fast;
  int n; cin >> n;
  int ar[n] = {0};

  for(int i=0;i<n;i++){
    cin >> ar[i];
  }

  map<int,int> mp;

  for(int i=0;i<n;i++){
    int num = ar[i];
    for(int j=1;j*j<=num;j++){
      if(num%j==0){
        mp[j]++;
        if(num/j!=j) mp[num/j]++;
      }
    }
  }

  bool flag = true;
  for(auto p  : mp){
    if(p.first>1&&p.second>1){
      flag = false;
      break;
    }
  }

  if(flag){
    cout << "pairwise coprime\n";
  }else{
    int g = __gcd(ar[0],ar[1]);
    for(int i=2;i<n;i++) g = __gcd(g,ar[i]);
    if(g==1){
      cout << "setwise coprime\n";
    }else{
      cout << "not coprime\n";
    }
  }

  return 0;
}