#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int arr[1000000 + 1], fact[1000000 + 1];
bool prime[1000000 + 1];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int ma = 0;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      ma = max(arr[i], ma);
    }
    memset(prime, false, sizeof(prime));
    for (int i = 0; i <= ma; i++) fact[i] = i;
    for (int i = 2; i <= ma; i++) {
      if (fact[i] == i)
        for (long long int j = 2 * i; j <= ma; j += i) {
          if (fact[j] == j) fact[j] = i;
        }
    }
    long long int p = 0;
    for (int i = 0; i < n; i++) {
      long long int a = arr[i];
      while (a > 1) {
        long long int h = fact[a];
        while (fact[a] == h) a /= fact[a];
        if (prime[h] == true) {
          p = 1;
          break;
        }
        prime[h] = true;
      }
    }
    if (p == 0) {
      cout << "pairwise coprime";
      return 0;
    }
    p = 0;
    long long int a = gcd(arr[0], arr[1]);
    for (int i = 0; i < n - 1; i++) a = gcd(arr[i + 1], a);
    if (a == 1)
      cout << "setwise coprime";
    else
      cout << "not prime";
  }
  return 0;
}
