#include <bits/stdc++.h>
const double pi = 3.141592653589793238462643383279;
using namespace std;
const double EPS = 1E-10;
long long GCD(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return GCD(b, a % b);
}
bool sieve[1010101];
int cnt[1010101];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  int N;
  cin >> N;
  vector<long long> A(N);
  long long d = 0;
  bool check = true;
  for (int i = 0; i < (int)N; ++i) {
    cin >> A[i];
    d = GCD(d, A[i]);
    cnt[A[i]]++;
    if (cnt[A[i]] >= 2) check = false;
    sieve[A[i]] = true;
  }
  if (d != 1) {
    cout << "not coprime" << endl;
  } else {
    memset(sieve, true, sizeof(sieve));
    sieve[0] = sieve[1] = false;
    for (int i = 2; i * i <= 1000000; i++) {
      if (sieve[i]) {
        int a = 0;
        if (cnt[i]) a++;
        for (int j = 2; i * j <= 1000000; j++) {
          if (cnt[i * j]) a++;
          sieve[i * j] = false;
        }
        if (a >= 2) check = false;
      }
    }
    if (check) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  }
  return 0;
}
