#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define sz(v) (int)v.size() 
#define all(v) v.begin(), v.end()
void dbg_out() { cerr << "\b\b]\n"; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T){ cerr << H << ", "; dbg_out(T...);}
#define watch(...) cerr << "[" << #__VA_ARGS__ << "]: [", dbg_out(__VA_ARGS__)


/****************************** CODE IS HERE ***********************************/

const int N = 1e6 + 4;
vector <int> factors(N+1);  //it will store smallest prime divisior of 'i'
bitset<N+10> primes;

void sieve(){
  primes.set();
  primes.reset(0);
  primes.reset(1);
  
  //if we have to check only primes then, it is better to do: i*i < N, in first loop,
  //no need to go to i < N
  for (ll i = 2; i < N; ++i){  
    if(primes[i]){
      factors[i] = i;
      for (ll j = i*i; j < N; j+=i){
        if(primes[j]){
          primes.reset(j);
          factors[j] = i;  //smallest prime factor of 'j'
        }
      }
    }
  }
}


int main(){
    ios_base::sync_with_stdio(false); cin.tie(nullptr);

    sieve();

    int n; cin >> n;
    vector <int> A(n);
    map <int, int> cnts;
    int gcd = 0;
    for (int &i: A) {
        cin >> i;
        gcd = __gcd(gcd, i);
        cnts[factors[i]]++;
    }

    bool ok = true;
    for (auto i: cnts) {
        if (i.second > 1) ok = false;
    }
    if (ok) {
        cout << "pairwise coprime";
        return 0;
    }
    if (gcd == 1) {
        cout << "setwise coprime";
    }
    else cout << "not coprime";

    return 0;
}

