#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; }
bool isPrime(long long x) {
  long long i;
  if (x < 2)
    return 0;
  else if (x == 2)
    return 1;
  if (x % 2 == 0) return 0;
  for (i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
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;
  }
  vector<long long> P;
  for (int i = 2; i * i <= 1e6; i++) {
    if (isPrime(i)) P.push_back(i);
  }
  for (auto p : P) {
    long long cnt = 0;
    for (auto x : V) {
      if (x % p == 0) cnt++;
      if (cnt >= 2) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
