#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const int MAX = 60;
const int mod = 1000000007;
vector<int> cnt(MAX, 0);
vector<int> a;
int N;
int gcd(int a, int b) { return (a % b) ? gcd(b, a % b) : b; }
bool isPc1() {
  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 < MAX; i++) {
    int num = cnt[i];
    if (isPrime[i]) {
      for (int j = i + i; j < MAX; j += i) {
        isPrime[j] = false;
        num += cnt[j];
      }
    }
    if (num >= 2) return false;
  }
  return true;
}
bool isSc() {
  int ret = 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 (isPc1()) {
    cout << "pairwise coprime" << '\n';
  } else if (isSc()) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
}
