#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1000000000000000000;
const long long MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<long long> al(n);
  vector<long long> cop(1000001);
  for (int j = 0; j < (n); j++) {
    cin >> al[j];
    vector<long long> res(al[j] + 1);
    int num = al[j];
    int pre = 0;
    for (int i = 2; i <= n; i++) {
      while (num % i == 0) {
        if (pre == i) {
          num /= i;
          pre = i;
          continue;
        }
        ++cop[i];
        pre = i;
      }
    }
    if (pre != num) {
      ++cop[num];
    }
  }
  string ans = "pairwise coprime";
  for (int i = 0; i < (1000000); i++) {
    if (i <= 1) {
      continue;
    }
    if (cop[i] == n) {
      ans = "not coprime";
      break;
    } else if (cop[i] >= 2) {
      ans = "setwise coprime";
    }
  }
  cout << ans << endl;
  system("pause");
}
