#include <bits/stdc++.h>
using namespace std;
const static long long INF = 1e15;
const long long MOD = 1e9 + 7;
vector<long long> Eratosthenes(long long N) {
  vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) is_prime[i] = true;
  vector<long long> 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() {
  long long N;
  cin >> N;
  vector<long long> V(N);
  for (int i = 0; i < N; i++) cin >> V[i];
  vector<long long> P = Eratosthenes(1e6);
  unordered_map<long long, long long> M;
  for (auto x : V) {
    for (auto p : P) {
      if (x % p == 0) M[p]++;
    }
  }
  long long cnt = 0;
  for (auto m : M) {
    cnt = max(cnt, m.second);
  }
  if (cnt == N)
    cout << "not coprime" << endl;
  else if (cnt >= 2)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
}
