#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
long long gcd(long long n, long long m) {
  if (n > m) {
    long long l = n;
    n = m;
    m = l;
  }
  if (n == 0) {
    return m;
  }
  while (1) {
    long long l = n;
    n = m % n;
    m = l;
    if (n == 0) {
      break;
    }
  }
  return m;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long i, j, k, l;
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (auto &e : A) cin >> e;
  long long g = A[0];
  for (i = 1; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (i = 2; i < 1000; i++) {
    long long count = 0;
    for (j = 0; j < N; j++) {
      if (A[j] % i == 0) {
        count++;
      }
    }
    if (count >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
