#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
const int mod = 1000000007, MAX = 1000005, INF = 1 << 30;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int cnt[MAX];
vector<int> prime;
bool is_prime[MAX + 1];
void sieve(int n) {
  for (int i = 0; i <= n; i++) {
    is_prime[i] = true;
  }
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      for (int j = 2 * i; j <= n; j += i) {
        cnt[j] += cnt[i];
        is_prime[j] = false;
      }
    }
  }
}
int main() {
  std::ifstream in("text.txt");
  std::cin.rdbuf(in.rdbuf());
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    cnt[A[i]]++;
  }
  sieve(MAX - 2);
  bool check = true;
  for (int i = 1; i < MAX; i++)
    if (cnt[i] >= 2) check = false;
  if (check) {
    cout << "pairwise coprime" << endl;
  } else {
    int g = 0;
    for (int i = 0; i < N; i++) {
      g = gcd(g, A[i]);
    }
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
