#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (a) {
    b %= a;
    swap(a, b);
  }
  return b;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int g = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    g = gcd(g, A[i]);
  }
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<bool> sosuu(1000008, false);
  vector<int> key;
  sosuu[0] = sosuu[1] = true;
  vector<bool> exa(1000008, false);
  for (int i = 0; i < N; i++) {
    if (exa[A[i]]) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    exa[A[i]] = true;
  }
  for (int i = 0; i < 1000008; i++) {
    if (!sosuu[i]) {
      sosuu[i] = true;
      key.push_back(i);
      int kj = 0;
      for (int j = 1; j * i < 1000008; j++) {
        sosuu[i * j] = true;
        if (exa[i * j]) kj++;
      }
      if (kj > 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
