#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int INFint = 1e9 + 1;
const ll INFll = (ll)1e18 + 1;
ll MOD = 1e9 + 7;
bool isprime(ll n) {
  if (n == 1) return false;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int cnt[1000000] = {0};
void prime_factor(int n) {
  int tmp(0);
  for (int i(2); i * i <= n; i++) {
    if (n % i == 0) {
      ++cnt[i];
      n /= i;
    }
  }
  if (n == tmp) cnt[n] = 1;
  return;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i(0); i < N; i++) cin >> A[i];
  for (int i(0); i < N; i++) {
    prime_factor(A[i]);
  }
  int maxi(0);
  for (int i(0); i < 1000000; i++) {
    maxi = max(maxi, cnt[i]);
  }
  if (maxi <= 1)
    cout << "pairwise coprime" << endl;
  else if (maxi < N)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
