#include <bits/stdc++.h>
using namespace std;
void prime_factrize(int n, map<int, int> &mp) {
  for (long long a = 2; a * a <= n; a++) {
    if (n % a != 0) continue;
    while (n % a == 0) {
      n /= a;
    }
    mp[a]++;
  }
  return;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  map<int, int> save;
  for (auto x : a) {
    map<int, int> mp;
    prime_factrize(x, mp);
    for (auto x : mp) {
      save[x.first]++;
    }
  }
  bool flag = false;
  bool flag2 = false;
  for (auto x : save) {
    if (x.second != 1) flag = true;
    if (x.second == n) flag2 = true;
  }
  if (!flag)
    cout << "pairwise coprime" << endl;
  else if (flag & !flag2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
