#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pllll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef priority_queue<ll, vector<ll>, greater<ll>> gpq;
const int MOD = 1000000007;
const long double PI = 3.1415926535897932;
vll prime_list(0);
void make_prime_list(int N) {
  int plsz = 0;
  for (int i = 2; i <= N; i++) {
    int sqi = (int)sqrt(i) + 1;
    bool p = true;
    for (int j = 0; j < plsz; j++) {
      if (i % prime_list[j] == 0) {
        p = false;
        break;
      }
      if (sqi < prime_list[j]) break;
    }
    if (p) {
      prime_list.push_back(i);
      plsz++;
    }
  }
}
ll gcd2(ll p, ll q) {
  if (p > q) swap(p, q);
  if (p == 0) return q;
  return gcd2(q % p, p);
}
int main() {
  make_prime_list(1000000);
  ll N;
  cin >> N;
  vll A(N);
  for (ll i = 0; i < N; i++) cin >> A[i];
  sort(A.begin(), A.end());
  vector<int> checklist(1000001, -1);
  bool pc = true;
  for (ll i = 0; i < N; i++) {
    if (pc == false) break;
    for (ll j = A[i]; j <= 1000000; j += A[i]) {
      if (checklist[j] == -1) {
        checklist[j] = A[i];
      } else {
        if (j < checklist[j] * A[i]) {
          pc = false;
          break;
        }
      }
    }
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll gcd = gcd2(A[0], A[1]);
  for (ll i = 2; i < N; i++) {
    gcd = gcd2(gcd, A[i]);
  }
  if (gcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
