#include <bits/stdc++.h>
using namespace std;
vector<int> Eratosthenes(const int N) {
  vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<int> A(N);
  vector<int> Prime = Eratosthenes(1000000);
  int min_A = 1000000007;
  int max_A = 0;
  for (long n = 0; n < (N); n++) {
    cin >> A[n];
  }
  bool pairwise_coprime = true;
  bool setwise_coprime = true;
  for (int p : Prime) {
    int count = 0;
    for (long n = 0; n < (N); n++) {
      if (A[n] % p == 0) {
        count++;
      }
    }
    if (count > 1) {
      pairwise_coprime = false;
    }
    if (count == N) {
      setwise_coprime = false;
    }
  }
  if (pairwise_coprime) {
    cout << "pairwise coprime" << endl;
  } else if (setwise_coprime) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
