#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool prime[1000006];
vector<int> store;
void SieveOfEratosthenes(int n) {
  store.assign(1000006, 0);
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      store[p] = p;
      for (int i = p * p; i <= n; i += p) {
        prime[i] = false;
        if (store[i] == 0) store[i] = p;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int res = A[0];
  for (int i = 1; i < n; i++) {
    res = gcd(res, A[i]);
  }
  if (res == 1) {
    cout << "setwise coprime";
    return 0;
  }
  SieveOfEratosthenes(1000001);
  map<int, int> temp;
  int check = 0;
  for (int i = 0; i < n; i++) {
    int k = store[A[i]];
    if (temp[k] > 0) {
      check = 1;
      break;
    }
    temp[k]++;
  }
  if (check == 1)
    cout << "no coprime";
  else
    cout << "pairwise coprime";
}
