#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pull = pair<ull, ll>;
using pis = pair<int, string>;
#define all(x) (x).begin(), (x).end()
#define INF 1000000000
#define LLINF 10000000000000000ll
#define MOD1 1000000007LL
#define MOD2 999999937LL

struct prime_n {
  int p = -1;
  bool isPrime = true;
};

int struct_prime(vector<prime_n>&primes) {
  primes[0].isPrime = false;
  primes[1].isPrime = false;
  int cnt = 0;
  for (int i = 0; i < primes.size(); i++) {
    if (!primes[i].isPrime) continue;
    primes[i].p = i;
    cnt++;
    for (int k = 2 * i; k < primes.size(); k += i) {
      primes[k].isPrime = false;
    }
  }
  return cnt;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  //cout << fixed << setprecision(15)

  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];

  if (n > 10000) {
    ll gcdall = a[0];
    for (int i = 0; i < n; i++) gcdall = __gcd(gcdall, a[i]);
    if (gcdall == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
  }

  vector<bool> isuse(1000001, false);
  bool ispairwise = true;
  ll gcdall = a[0];
  for (int i = 0; i < n; i++) {
    ll tar = a[i];
    gcdall = __gcd(gcdall, a[i]);
    for (int j = 2; j * j <= 1000001; j++) {
      if (tar % j == 0) {
        if (!isuse[j]) {
          while(tar % j == 0) tar /= j;
          isuse[j] = true;
        }
        else {
          //cout << "p: " << j << endl;
          ispairwise = false;
          //break;
        }
      }
      //if (!ispairwise) break;
    }
    if (tar != 1) {
      if (!isuse[tar]) {
        //cout << "pa: " << tar << endl;
        isuse[tar] = true;
      }
      else {
        ispairwise = false;
        //break;
      }
    }
    //if (!ispairwise) break;
  }
  //cout << gcdall << endl;
  if (ispairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (gcdall == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  
  /*vector<prime_n> primes_(1000001);
  ll lenp = struct_prime(primes_);
  vector<ll> primes;
  for (int i = 0; i < primes_.size(); i++) if (primes_[i].isPrime) primes.emplace_back(primes_[i].p);

  vector<bool> isuse(lenp);
  bool ispairwise = true;
  ll gcdall = a[0];
  for (int i = 0; i < n; i++) {
    ll temp = a[i];
    for (int j = 0; j < lenp; j++) {
      if (temp % primes[j] == 0) {
        if (!isuse[j]) {
          isuse[j] = true;
          while (temp % primes[j] == 0) temp /= primes[j];
        }
        else {
          ispairwise = false;
          break;
        }
      }
    }
    
  }*/

  
}
