#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
static long long INF = (1LL << 62);
int isPrime(long long p) {
  if (p <= 1) return 0;
  if (p == 2 || p == 3 || p == 5 || p == 7) return 1;
  if (p == 4 || p == 6 || p == 8 || p == 9) return 0;
  long long i;
  int ret = 1;
  for (i = 2; i * i <= p; i++) {
    if (p % i == 0 && i != p) {
      ret = 0;
      break;
    }
  }
  return ret;
}
long long GCD(long long x, long long y) {
  long long r = 0;
  if (x < y) swap(x, y);
  r = x % y;
  while (r != 0) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
int main(int argc, char* argv[]) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N;
  vector<long long> A;
  cin >> N;
  for (int i = 0; i < N; i++) {
    long long a;
    cin >> a;
    A.push_back(a);
  }
  vector<long long> PRM;
  for (int i = 2; i <= 1001; i++) {
    if (isPrime(i) == 1) {
      PRM.push_back(i);
    }
  }
  int co = 0;
  for (int i = 0; i < PRM.size(); i++) {
    co = 0;
    for (int j = 0; j < A.size(); j++) {
      if ((A[j] % PRM[i]) == 0) {
        co++;
      }
    }
    if (co == N) {
      printf("not coprime\n");
      return 0;
    } else if (co > 1) {
      break;
    }
  }
  if (co > 1) {
    printf("setwise coprime\n");
  } else {
    printf("pairwise coprime\n");
  }
  return 0;
}
