#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
vector<long long> Era(int n) {
  vector<long long> is_prime(n, 1), Q;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= n; j += i) is_prime[j] = 0;
      Q.push_back(i);
    }
  }
  return Q;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  long long a = A[0];
  for (int i = 0; i < n; i++) a = gcd(a, A[i]);
  if (a != 1) {
    cout << "not coprime";
    return 0;
  }
  sort(A.begin(), A.end());
  for (int i = 0; i < n - 1; i++) {
    if (A[i] == A[i + 1] && A[i] != 1) {
      cout << "setwise coprime";
      return 0;
    }
  }
  for (auto i : Era(1000)) {
    int x = 0;
    for (int j = 0; j < n; j++)
      if (A[j] % i == 0) x++;
    if (x > 1) {
      cout << "setwise coprime";
      return 0;
    }
  }
  cout << "pairwise coprime";
}
