#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
int gcd(int n, int m) {
  if (n < m) swap(n, m);
  if (m == 0) return n;
  return gcd(m, n % m);
}
int main() {
  while (cin >> n) {
    int x;
    set<int> s;
    bool ok = true;
    for (int i = 0; i < n; ++i) {
      int a;
      cin >> a;
      if (i == 0) {
        x = a;
      } else {
        x = gcd(x, a);
      }
      for (int t : s) {
        while (a % t == 0) a /= t;
      }
      ok &= a > 1;
      for (int i = 2; i * i < a; ++i) {
        if (a % i) continue;
        s.insert(i);
        while (a % i == 0) a /= i;
      }
      if (a > 1) s.insert(a);
    }
    if (ok)
      cout << "pairwise coprime" << endl;
    else if (x == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
