#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using MATRIX = vector<vector<ll> >;
int N;
int a[1000000];
int b[1000001] = {0};
vector<int> v[1000001];
int prm[1000001];
void Eratosthenes(int N) {
  vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  prm[1] = 1;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      prm[i] = i;
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
        prm[j] = i;
      }
    }
  }
}
int main() {
  cin >> N;
  int M = 0;
  for (int i = 0; i < (int)(N); ++i) {
    cin >> a[i];
    M = max(M, a[i]);
  }
  Eratosthenes(M + 1);
  bool f = false;
  for (int i = 0; i < (int)(N); ++i) {
    int x = a[i];
    do {
      b[prm[x]]++;
      if (b[prm[x]] >= 2) {
        f = true;
      }
      if (b[prm[x]] == N) {
        cout << "not coprime" << endl;
        return 0;
      }
      x /= prm[x];
    } while (x != prm[x]);
  }
  if (f)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
