#include <bits/stdc++.h>
using namespace std;
inline void solve() {
  map<long long, long long> c;
  long long n;
  cin >> n;
  long long g = 0, mx = 0, e = 0;
  for (long long i = 0, a; i < n; i++) {
    cin >> a;
    c[a]++;
    mx = max(mx, a);
  }
  long long p = 1, s = 1;
  long long cur = 0;
  for (long long i = 2; i * i <= mx; i++) {
    long long cur = 0;
    for (long long j = i; j <= mx; j += i) cur += c[j];
    if (cur >= n) s = 0;
    if (cur > 1) p = 0;
  }
  if (p > 0)
    cout << "pairwise coprime" << endl;
  else if (s > 0)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
signed main() {
  long long n = 1;
  while (n--) solve();
  return 0;
}
