#include <bits/stdc++.h>
using namespace std;
ofstream out("debug.txt");
const int MxN = 1e5, md = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<bool> p(1e6 + 1, 1);
  for (long long i = 2; i * i <= 1e6; ++i)
    if (p[i])
      for (long long j = i * i; j <= 1e6; j += i) p[j] = 0;
  set<long long> prime;
  for (int i = 2; i <= 1e6; ++i)
    if (p[i]) prime.insert(i);
  int n;
  cin >> n;
  vector<int> v(n);
  map<int, int> m;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    if (prime.count(v[i]))
      m[v[i]]++;
    else {
      for (long long a : prime) {
        if (a > v[i]) break;
        if (v[i] % a == 0) {
          m[a]++;
          while (v[i] % a == 0) v[i] /= a;
        }
      }
    }
  }
  int mx = 0;
  for (auto a : m) mx = max(mx, a.second);
  if (mx == n)
    cout << "not coprime";
  else if (mx == 1)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
}
