#include <bits/stdc++.h>
int MOD_BIG = 1000000007;
int MOD_BIG2 = 998244353;
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
using std::string;
using ll = long long;
using pint = std::pair<int, int>;
using pll = std::pair<ll, ll>;
using std::vector;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
bool isPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
vector<int> primes;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (0), i_end_ = (N); i < i_end_; i++) {
    cin >> A[i];
  }
  std::sort(A.begin(), A.end());
  for (int i = (2), i_end_ = (A.back() + 1); i < i_end_; i++) {
    if (isPrime(i)) {
      primes.push_back(i);
    }
  }
  int setgcd = A[0];
  for (int i = (1), i_end_ = (N); i < i_end_; i++) {
    setgcd = gcd(setgcd, A[i]);
  }
  if (setgcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  bool pair = true;
  for (auto p : primes) {
    int cnt = 0;
    for (int i = (0), i_end_ = (N); i < i_end_; i++) {
      if (A[i] % p == 0) {
        cnt++;
      }
      if (cnt >= 2) {
        pair = false;
        break;
      }
    }
    if (!pair) break;
  }
  if (pair) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
