#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define ll long long
#define rep(i,n) for(int i = 0; i < int(n); i++)
#define vi vector<int>
using namespace std;
const int INF = 1001001001;
const int MOD = 1e9+7;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template<class T> inline bool chmax(T &a, const T &b){ if(a<b) { a=b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b){ if(b<a) { a=b; return 1; } return 0; }

inline map<ll,int> sieve(ll n){
  map<ll,int> PrimeNumber;
  for(ll i = 2; i*i <= n; i++){
    while(n % i == 0){
      PrimeNumber[i]++;
      n /= i;
    }
  }
  if(n != 1) PrimeNumber[n] = 1;
  return PrimeNumber;
}

int main(){
  cin.tie(0), ios::sync_with_stdio(false);
  int n; cin >> n;
  int gcd = 0;
  map<int,int> mp;
  bool ok = true;
  rep(i,n){
    int a; cin >> a;
    gcd = __gcd(gcd,a);
    auto res = sieve(a);
    for(auto x : res){
      if(mp[x.first]) ok = false;
      mp[x.first]++;
    }
  }
  if(gcd != 1){
    cout << "not coprime";
    return 0;
  }
  if(ok){
    cout << "pairwise coprime";
  }else{
    cout << "setwise coprime";
  }
  cout << "\n";
  return 0;
}
