#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T1, typename T2>
bool chmax(T1 &a, T2 b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T1, typename T2>
bool chmin(T1 &a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
vector<int> prime(0, 0);
void eratos() {
  vector<bool> N(1001, true);
  N[0] = false;
  N[1] = false;
  for (int i = 2; i <= 1000; i++) {
    if (N[i]) prime.push_back(i);
    int j = 2;
    while (i * j <= 1000) N[i * j++] = false;
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  eratos();
  int N;
  cin >> N;
  vector<int> A(N, 0), B(1000010, 0);
  int ans = 2;
  for (int k = 0; k < N; ++k) {
    int a;
    cin >> a;
    for (int i = 0; prime[i] * prime[i] <= a; i++) {
      int p = prime[i];
      if (a % p == 0) {
        if (B[p] > 0) ans = 1;
        B[p]++;
        while (a % p == 0) a /= p;
      }
    }
    if (a > 1) {
      if (B[a] > 0) ans = 1;
      B[a]++;
    }
  }
  if (ans == 2) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (int i = 2; i <= 1000000; i++) {
    if (B[i] == N) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
}
