#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const long long LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 1000001;
const int mod = 1000000007;
const double pi = 3.141592653589;
vector<int> cnt(MAX, 0);
vector<int> a;
int N;
int gcd(int a, int b) {
  int tmp;
  while (b) {
    tmp = a;
    a = b;
    b = tmp % b;
  }
  return a;
}
bool ispc() {
  for (int i = 0; i < N; i++) {
    cnt[a[i]]++;
  }
  vector<bool> isPrime(MAX, true);
  isPrime[0] = isPrime[1] = false;
  for (int i = 2; i * i < MAX; i++) {
    int num = 0;
    if (isPrime[i]) {
      int j = i + i;
      while (j < MAX) {
        isPrime[j] = false;
        num += cnt[j];
        j += i;
      }
    }
    if (num >= 2) return false;
  }
  return true;
}
bool issc() {
  int ret = a[0];
  for (int i = 0; i < N; i++) {
    ret = gcd(ret, a[i]);
  }
  if (ret == 1)
    return true;
  else
    return false;
}
int main() {
  cin >> N;
  a.resize(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  if (ispc()) {
    cout << "pairwise coprime" << '\n';
  } else if (issc()) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
}
