#include <bits/stdc++.h>
using namespace std;
using lint = long int;
int N, tmp, a, GCD;
vector<lint> A(1000010);
vector<lint> spf(1000010);
vector<lint> emerge(1000010, 0);
bool SC = true, PC = true;
int gcd(int x, int y) {
  if (x % y == 0)
    return y;
  else
    return gcd(y, x % y);
}
int main() {
  cin >> N;
  for (int i = 0; i <= 1000010; i++) spf[i] = i;
  for (int i = 2; i * i <= 1000010; i++) {
    if (spf[i] == i) {
      for (int j = 2 * i; j <= 1000010; j += i) {
        if (spf[j] == j) spf[j] = i;
      }
    }
  }
  for (int i = 0; i < N; i++) cin >> A[i];
  GCD = A[0];
  for (int i = 1; i < N; i++) GCD = gcd(GCD, A[i]);
  if (GCD != 1) SC = false;
  for (int i = N - 1; i >= 0; i--) {
    a = A[i];
    while (a != 1) {
      tmp = spf[a];
      if (emerge[tmp] > 0) {
        PC = false;
        break;
      } else
        emerge[tmp] = 1;
      while (a != 1 || spf[a] == tmp) a /= spf[a];
    }
  }
  if (PC)
    cout << "pairwise coprime" << endl;
  else if (SC)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
