#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;
vector<long long> enum_divisors(long long N) {
  vector<long long> res;
  for (long long i = 1; i * i <= N; ++i) {
    if (N % i == 0) {
      res.push_back(i);
      if (N / i != i) res.push_back(N / i);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<long long> al(n);
  vector<long long> cop(1000001);
  for (int i = 0; i < (n); i++) {
    cin >> al[i];
    vector<long long> res = enum_divisors(al[i]);
    for (int i = 0; i < (res.size()); i++) {
      ++cop[res[i]];
    }
  }
  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");
}
