#include <bits/stdc++.h>
using namespace std;
int gcd(int u, int v) {
  if (u == v) return u;
  if (u == 0) return v;
  if (v == 0) return u;
  if (~u & 1)
    if (v & 1)
      return gcd(u >> 1, v);
    else
      return gcd(u >> 1, v >> 1) << 1;
  if (~v & 1) return gcd(u, v >> 1);
  if (u > v) return gcd(u - v, v);
  return gcd(v - u, u);
}
bool prime[1000006];
int store[1000006];
void SieveOfEratosthenes() {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= 1000006; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= 1000006; i += p) {
        prime[i] = false;
        store[i] = p;
      }
    }
  }
  for (int p = 2; p <= 1000006; p++)
    if (prime[p]) cout << 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;
  }
  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 == 0)
    cout << "pairwise coprime";
  else
    cout << "not coprime";
}
