#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int B[1000001];
  int d = 0;
  bool c = false;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    d = gcd(d, A[i]);
    if (!c)
      for (int j = 1; A[i] * j <= 1000000; j++) {
        if (j == 1 && B[A[i] * j] == 1) {
          c = true;
          break;
        }
        B[A[i] * j]++;
      }
  }
  if (d != 1)
    puts("not coprime");
  else if (c)
    puts("setwise coprime");
  else
    puts("pairwise coprime");
}
