#include <bits/stdc++.h>
using namespace std;
int p[1000000];
int main() {
  int N;
  cin >> N;
  int count = 0;
  for (int i = 2; i <= 1000000; i++) {
    if (i == 2) {
      p[0] = 2;
      count++;
      continue;
    }
    for (int j = 0; j < count; j++) {
      if (i % p[j] == 0) break;
      if (sqrt(i) < p[j] || j == count - 1) {
        p[count] = i;
        count++;
        break;
      }
    }
  }
  int S[count];
  for (int i = 0; i < count; i++) S[i] = 0;
  int A[N];
  for (int i = 0; i < N; i++) cin >> A[i];
  for (int i = 0; i < N; i++) {
    int a = A[i];
    for (int i = 0; i < count; i++) {
      if (a % p[i] == 0) {
        while (a % p[i] == 0) a /= p[i];
        S[i]++;
      }
      if (sqrt(a) > p[i]) {
        int b = lower_bound(p + i, p + count, a) - p;
        S[b]++;
        break;
      }
      if (a == 1) break;
    }
  }
  sort(S, S + count);
  if (S[count - 1] <= 1)
    cout << "pairwise coprime" << endl;
  else if (S[count - 1] < N)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
