#include <bits/stdc++.h>

using namespace std;
using ll = long long;

class Prime {
// n以下の素数を列挙する
public:
  const int n;
  vector<bool> is_prime;
  vector<int> primes;
  Prime(int size) : n(size), is_prime(n+1, true) {
    is_prime[0] = false;
    is_prime[1] = false;
    for (int i = 2; i <= n; ++i) {
      if (!is_prime[i]) continue;
      primes.push_back(i);
      int tmp = 2*i;
      while (tmp <= n) {
        is_prime[tmp] = false;
        tmp += i;
      }
    }
  }

  bool check(int x) { return is_prime[x]; }
};

struct PrimeFactorization {
  // n*n以下の数についての素因数分解
  const int n;
  Prime p;
  PrimeFactorization(int n) : n(n), p(n) {}

  map<ll, int> calc(ll a) {
    map<ll, int> ret;
    ll tmp = a;
    for (int i: p.primes) {
      int count = 0;
      while (tmp % i == 0) { 
        ++count;
        tmp /= i;
      }
      if (count > 0) ret[i] = count;
    }
    if (tmp > 1) ret[tmp] = 1;
    return ret;
  }
};


void solve() {
    PrimeFactorization pf(1000000);
    map<ll, int> factors;
    vector<bool> pc(1000001, false);

    int N;
    cin >> N;
    vector<int> A(N);
    bool is_pc = true;

    cin >> A[0];
    factors = pf.calc(A[0]);
    for (auto it : factors) {
        if(pc[it.first]) {
            is_pc = false;
        }
        pc[it.first] = true;
    }
    int gcd_sc = A[0];

    for (int i = 1; i < N; i++)
    {
        cin >> A[i];
        factors = pf.calc(A[i]);
        for (auto it : factors) {
            if(pc[it.first]) {
                is_pc = false;
            }
            pc[it.first] = true;
        }
        gcd_sc = gcd(gcd_sc, A[i]);
    }
    if (is_pc)
    {
        cout << "pairwise coprime" << endl;
    }
    else if (gcd_sc == 1)
    {
        cout << "setwise coprime" << endl;
    }
    else
    {
        cout << "not coprime" << endl;
    }
    

}

int main() {
    solve();
    return 0;
}