#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];
  int MAX_A = 1e6 + 2;
  vector<int> is_prime(MAX_A, 1), min_prime(MAX_A);
  is_prime[0] = is_prime[1] = 0;
  min_prime[0] = min_prime[1] = -1;
  for (int i = 0; i < MAX_A; ++i) {
    if (is_prime[i]) {
      min_prime[i] = i;
      for (int j = 2; i * j < MAX_A; ++j) {
        is_prime[i * j] = 0;
        min_prime[i * j] = i;
      }
    }
  }
  if (N == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = 0;
  for (int i = 0; i < N; ++i) g = gcd(g, A[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<int> used(MAX_A);
  for (int i = 0; i < N; ++i) {
    set<int> element;
    int now = A[i];
    while (now != 1) {
      element.insert(min_prime[now]);
      now /= min_prime[now];
    }
    for (int e : element) ++used[e];
  }
  for (int i = 0; i < N; ++i) {
    if (used[i] > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
