#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
int main() {
  long long int N;
  cin >> N;
  vector<long long int> A(N);
  for (long long int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  sort(A.begin(), A.end());
  bool b = false;
  for (long long int i = 0; i < N - 1; i++) {
    if (A.at(i) == A.at(i + 1) && A.at(i) != 1) {
      b = true;
      break;
    }
  }
  if (b) {
    cout << "not coprime" << endl;
  } else {
    vector<long long int> B;
    long long int B_size = 0;
    for (long long int i = 0; i < N; i++) {
      for (long long int j = 1; j * j <= A.at(i); j++) {
        if (A.at(i) % j == 0 && j != 1) {
          B.push_back(A.at(i) / j);
          B_size++;
        }
      }
    }
    sort(B.begin(), B.end());
    if (B_size == 0 || B_size == 1) {
      cout << "pairwise coprime" << endl;
    } else {
      bool c = true;
      for (long long int i = 0; i < B_size - 1; i++) {
        if (B.at(i) == B.at(i + 1)) {
          c = false;
          break;
        }
      }
      if (c) {
        cout << "pairwise coprime" << endl;
      } else {
        long long int g = gcd(B.at(0), B.at(1));
        for (long long int i = 0; i < B_size; i++) {
          g = gcd(g, B.at(i));
        }
        if (g == 1) {
          cout << "setwise coprime" << endl;
        } else {
          cout << "not coprime" << endl;
        }
      }
    }
  }
}
