#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long inverse2 = 500000004;
int main() {
  int n;
  cin >> n;
  vector<int> A(n);
  vector<int> prime(1000001);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] % 2 == 0) {
      prime[2]++;
    }
    while (A[i] % 2 == 0) {
      A[i] /= 2;
    }
    int j = 3;
    while (j <= A[i]) {
      if (A[i] % j == 0) {
        prime[j]++;
      }
      while (A[i] % j == 0) {
        A[i] /= j;
      }
      j += 2;
    }
  }
  bool pair = true;
  bool set = true;
  for (int i = 2; i <= 1000000; i++) {
    if (prime[i] > 1) {
      pair = false;
    }
    if (prime[i] == n) {
      set = false;
    }
  }
  if (pair) {
    cout << "pairwise coprime" << '\n';
  } else {
    if (set) {
      cout << "setwise coprime" << '\n';
    } else {
      cout << "not coprime" << '\n';
    }
  }
  return 0;
}
