#include <bits/stdc++.h>
using namespace std;
const static long long INF = 1e15;
const long long MOD = 1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  long long N;
  cin >> N;
  vector<long long> V(N);
  for (int i = 0; i < N; i++) cin >> V[i];
  long long GCD = gcd(V[0], V[1]);
  for (int i = 2; i < N; i++) GCD = gcd(GCD, V[i]);
  if (GCD != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  unordered_map<long long, long long> MP;
  for (int i = 0; i < N; i++) {
    long long x = V[i];
    for (long long i = 2; i * i <= x; i++) {
      if (x % i != 0) continue;
      long long j = x / i;
      MP[i]++;
      MP[j]++;
      if (i == j) MP[i]--;
    }
  }
  for (auto p : MP) {
    if (p.second != 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
}
