#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pairi = pair<int, int>;
using pairl = pair<ll, ll>;
ll gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
void printVector(const vector<ll>& vec) {
  for (ll value : vec) {
    cout << value << " ";
  }
  cout << endl;
}
vector<int> IntegerToVector(int bit, int N) {
  vector<int> S;
  for (int i = 0; i < N; ++i) {
    if (bit & (1 << i)) {
      S.push_back(i);
    }
  }
  return S;
}
int main() {
  ll N;
  cin >> N;
  vl A(N);
  for (ll i = 0; i < (ll)N; ++i) cin >> A[i];
  sort(A.begin(), A.end());
  vl p;
  p.push_back(2);
  for (ll n = 3; n <= sqrt(A[N - 1]); ++n) {
    for (ll k = 0; k != p.size(); ++k) {
      if (n % p[k] == 0) {
        goto xyz;
      }
      if (p[k] > sqrt(n)) {
        break;
      }
    }
    p.push_back(n);
  xyz:;
  }
  vl q(p);
  for (int i = 0; i != q.size(); ++i) {
    for (int j = 0; j < N; ++j) {
      if (A[j] % q[i] == 0 & A[j] / q[i] > sqrt(A[N - 1])) {
        p.push_back(A[j] / q[i]);
      }
    }
  }
  sort(p.begin(), p.end());
  p.erase(unique(p.begin(), p.end()), p.end());
  ll jj, kk = 0, lm = 0;
  for (int i = 0; i != p.size(); ++i) {
    jj = 0;
    for (int j = 0; j < N; ++j) {
      if (A[j] % p[i] == 0) {
        ++jj;
      }
    }
    if (jj == N) {
      ++kk;
    } else if (jj >= 2) {
      ++lm;
    }
  }
  if (kk > 0) {
    cout << "not coprime" << endl;
  } else if (kk == 0 & lm > 0) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
}
