#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
long long POWER(long long x, long long y) {
  long long ret = 1;
  long long p = x;
  for (long long i = y; i > 0; i /= 2) {
    if (i % 2) ret = (ret * p) % MOD;
    p = (p * p) % MOD;
  }
  return ret;
}
long long gcm(long long a, long long b) {
  if (b > a) {
    long long c = a;
    a = b;
    b = c;
  }
  while (b > 0) {
    long long r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main(int argc, char *argv[]) {
  int n;
  cin >> n;
  vector<int> a(n);
  cin >> a[0];
  int Gall = a[0];
  bool pair = true;
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    if (pair) {
      for (int j = 0; j < i; j++) {
        if (gcm(a[i], a[j]) > 1) {
          pair = false;
          break;
        }
      }
    }
    Gall = gcm(Gall, a[i]);
    if (!pair && Gall == 1) break;
  }
  if (pair)
    cout << "pairwise coprime" << endl;
  else if (Gall == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
