#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<int> Prime;
void help() {
  Prime.push_back(2);
  Prime.push_back(3);
  for (int i = 5; i < 1000; i += 2) {
    bool p = 1;
    int a = sqrt(i);
    for (int j = 1; j < Prime.size(); j++) {
      if (Prime[j] > a) break;
      if (i % Prime[j] == 0) {
        p = 0;
        break;
      }
    }
    if (p) Prime.push_back(i);
  }
}
string solve() {
  int n, a, p;
  cin >> n;
  vector<int> A(n);
  cin >> A[0];
  a = A[0];
  p = 0;
  for (int i = 1; i < n; i++) {
    cin >> A[i];
    p = max(p, A[i]);
    a = gcd(A[i], a);
  }
  if (a > 1) return "not coprime";
  if (n > 1000 && n >= p / 4) return "setwise coprime";
  if (n > 100 && n >= p / 3) return "setwise coprime";
  help();
  vector<bool> B(1000001);
  for (int i = 0; i < n; i++) {
    int x = A[i];
    if (B[x]) return "setwise coprime";
    for (int a : Prime) {
      if (x % a == 0) {
        if (B[a]) return "setwise coprime";
        B[a] = 1;
      }
    }
    B[x] = 1;
  }
  return "pairwise coprime";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << solve();
}
