#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll/*, vl, greater<ll>*/> pql; //降順(/*昇順*/)
typedef set<ll> sl;
typedef pair<ll, ll> pl;
typedef vector<vl> vvl;
typedef vector<pl> vpl;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
#define rep2(i, k, n) for(ll i = ll(k); i <= ll(n); i++)
#define rep3(i, n, k) for(ll i = ll(n); i >= ll(k); i--)
#define all(v) (v).begin(), (v).end()
ll mod(ll a, ll b) {if(b == 0) return 0; return (a % b + b) % b;}
bool chmin(ll &a, ll b) {if(b < a) {a = b; return 1;} return 0;}
bool chmax(ll &a, ll b) {if(b > a) {a = b; return 1;} return 0;}
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;
const ll MAX = 1e9;
const char newl = '\n';

vl Prime;
void get_Prime (ll n) {
  vb prime(n+1, 1);
  prime[0] = 0;
  prime[1] = 0;
  
  rep2(i, 2, n) {
    if(!prime[i]) continue;
    
    Prime.push_back(i);
    for(ll j=2; i*j < n; j++) {
      prime[i*j] = 0;
    }
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  ll n;
  cin >> n;
  vl a(n);
  rep(i, n) cin >> a[i];
  
  ll g=a[0];
  rep2(i, 1, n-1) g = gcd(g, a[i]);
  if(g!=1) {cout << "not coprime" << newl; return 0;}
  
  ll M=0;
  rep(i, n) chmax(M, a[i]);

  vb prime(M+1, 1);
  prime[0] = 0;
  prime[1] = 0;
  
  vl HPF(M+1);
  rep(i, M+1) HPF[i] = i;
  
  rep2(i, 2, M) if(prime[i]) for(ll j=2; i*j < M; j++) {prime[i*j] = 0; HPF[i*j] = i;}
  
  rep(i, n) {
    while(a[i]>1) {
      ll num = HPF[a[i]];
      if(!prime[num]) {cout << "setwise coprime" << newl; return 0;}
      prime[num] = 0;
      while(a[i]%num==0) a[i] /= num;
    }
  }
  
  cout << "pairwise coprime" << newl;
  return 0;
}