#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e6;
bool is_prime[N + 5];
int d[N + 5];
int mp[N + 5];
int main() {
  for (int i = 0; i < N; i++) is_prime[i] = true;
  for (int i = 2; i < N; i++) {
    if (is_prime[i]) d[i] = i;
    for (int j = i + i; j < N; j += i) {
      is_prime[j] = false;
      if (is_prime[i] && d[j] == 0) d[j] = i;
    }
  }
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> p;
  for (int i = 0; i < n; i++) {
    while (a[i] > 1) {
      int m = d[a[i]];
      a[i] /= m;
      if (a[i] % m != 0) p.push_back(m);
    }
  }
  for (auto x : p) mp[x]++;
  int ans = 0;
  for (int i = 1; i < N + 5; i++) {
    if (mp[i] >= 2) ans = 1;
    if (mp[i] == n) {
      ans = 2;
      break;
    }
  }
  if (ans == 0) cout << "pairwise coprime" << endl;
  if (ans == 1) cout << "setwise coprime" << endl;
  if (ans == 2) cout << "not coprime" << endl;
  return 0;
}
