#include <bits/stdc++.h>
using namespace std;
bool judge = 0;
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
vector<long long> SPF(long long n) {
  vector<long long> spf(n + 1);
  for (int i = 0; i <= n; i++) spf[i] = i;
  for (long long i = 2; i * i <= n; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j <= n; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
  return spf;
}
void prime(long long N, map<long long, bool> &ma, vector<long long> spf) {
  map<long long, bool> maa;
  while (N != 1) {
    maa[spf[N]] = true;
    N /= spf[N];
  }
  for (auto m : maa) {
    if (ma[m.first]) {
      judge = 1;
      break;
    } else {
      ma[m.first] = true;
    }
  }
}
long long MAX = 2000000;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<long long> A(N);
  vector<long long> spf = SPF(MAX);
  long long gcd;
  map<long long, bool> ma;
  for (int i = 0; i < (int)(N); i++) {
    if (i == 0) gcd = A[i];
    cin >> A[i];
    gcd = GCD(gcd, A[i]);
    if (!judge) prime(A[i], ma, spf);
  }
  if (!judge && gcd == 1) {
    cout << "pairwise coprime" << endl;
  } else if (gcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
