#include <bits/stdc++.h>
using namespace std;
using lint = long long;
using vi = vector<lint>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<lint, lint>;
lint modpow(lint a, lint n, lint m = 1000000007) {
  lint ans = 1;
  while (n > 0) {
    if (n % 2 == 1) ans *= a;
    ans %= m;
    a *= a;
    a %= m;
    n /= 2;
  }
  return ans;
}
lint inv(lint a, lint m = 1000000007) { return modpow(a, m - 2, m); }
int main() {
  lint N;
  cin >> N;
  vi A(N);
  for (lint i = 0; i < N; i++) cin >> A[i];
  vi B = A;
  bool pairwise = true;
  bool setwise = true;
  for (lint i = 2; true; i++) {
    if (!pairwise) break;
    lint cnt = 0;
    for (lint j = 0; j < N; j++) {
      if (A[j] % i == 0) {
        A[j] /= i;
        cnt++;
      }
      if (cnt == 2) {
        pairwise = false;
        break;
      }
    }
    lint over = 0;
    for (lint j = 0; j < N; j++) {
      if (A[j] < i) over++;
    }
    if (over == N) break;
  }
  for (lint i = 2; true; i++) {
    if (!setwise) break;
    lint cnt = 0;
    for (lint j = 0; j < N; j++) {
      if (B[j] % i == 0) {
        B[j] /= i;
        cnt++;
      }
      if (cnt == N) {
        setwise = false;
        break;
      }
    }
    lint over2 = 0;
    for (lint j = 0; j < N; j++) {
      if (B[j] < i) over2++;
    }
    if (over2 == N) break;
  }
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else if (setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
