#include <bits/stdc++.h>
int GCD(int x, int y) {
  if (x % y == 0) {
    return y;
  }
  return GCD(y, x % y);
}
int main() {
  using namespace std;
  int MAX_A = 1000000;
  vector<int> highest_prime(MAX_A + 1, 1e9);
  vector<int> count(MAX_A + 1, 0);
  for (int i = 2; i <= MAX_A; i++) {
    if (highest_prime[i] != 1e9) continue;
    highest_prime[i] = i;
    for (long long j = (long long)i * i; j <= MAX_A; j += i) {
      highest_prime[j] = min(highest_prime[j], i);
    }
  }
  int N;
  cin >> N;
  vector<int> A(N);
  int setwise_gcd = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    setwise_gcd = GCD(setwise_gcd, A[i]);
  }
  if (setwise_gcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < N; i++) {
    while (A[i] > 1) {
      int divide = highest_prime[A[i]];
      count[divide]++;
      while (A[i] % divide == 0) {
        A[i] /= divide;
      }
    }
  }
  for (int i = 0; i <= MAX_A; i++) {
    if (i == 5) cout << count[i] << endl;
    if (count[i] >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
}
