#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int N;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  vector<int> A(N);
  int a = 0;
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
    a = max(a, A[i]);
  }
  vector<int> prime;
  vector<bool> is_prime(a + 1);
  vector<int> D(a + 1);
  D[1] = 1;
  int b1 = 0;
  int b2 = 0;
  b1 = A[N - 1];
  for (int i = 0; i < (N - 1); i++) {
    b1 = gcd(b1, A[i]);
  }
  if (b1 != 1) cout << "not coprime" << endl;
  int p = 0;
  for (int i = 0; i <= a; i++) is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 0; i <= a; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      D[i] = i;
      p++;
      for (int j = 2 * i; j <= a; j += i) {
        if (is_prime[j]) D[j] = i;
        is_prime[j] = false;
      }
    }
  }
  vector<multiset<int>> s(a + 1);
  for (int i = 0; i < (N); i++) {
    int a2 = A[i];
    while (a2 > 1) {
      int a3 = D[a2];
      s[D[a2]].insert(A[i]);
      while (a2 % a3 == 0) a2 /= a3;
    }
  }
  for (int i = 0; i < (a + 1); i++) {
    if (s[i].size() >= 2) {
      b2 = 1;
    }
  }
  if (b1 == 1 && b2 == 1) cout << "setwise coprime" << endl;
  if (b2 != 1) cout << "pairwise coprime" << endl;
}
