#include <bits/stdc++.h>
using namespace std;
const long long INF = (1LL << 60);
vector<int> Eratosthenes(const int N) {
  vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  vector<int> pair<long long, long long>;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      pair<long long, long long>.emplace_back(i);
    }
  }
  return pair<long long, long long>;
}
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  long long r;
  while (y > 0) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  long long ma = -1;
  map<int, int> mp;
  for (int i = 0; i < (int)N; i++) {
    cin >> A[i];
    mp[A[i]]++;
    ma = max(ma, A[i]);
  }
  long long SA = A[0];
  for (int i = 0; i < (int)N - 1; i++) {
    SA = gcd(SA, A[i + 1]);
  }
  bool is_P = true, is_S = false;
  if (SA == 1) is_S = true;
  vector<int> prime = Eratosthenes(ma);
  for (int i = 0; i <= prime.size(); i++) {
    int p = prime[i];
    int x = p;
    if (p == 0) continue;
    int tmp = 0, cnt = 1;
    while (x <= ma) {
      cnt++;
      tmp += mp[x];
      x = p * cnt;
    }
    if (tmp >= 2) {
      is_P = false;
      break;
    }
  }
  if (is_P)
    cout << "pairwise coprime" << endl;
  else if (is_S)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
