#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  long long all;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (i == 0)
      all = a[i];
    else
      all = gcd(all, a[i]);
  }
  unordered_set<int> seen;
  bool pc = true;
  for (int i = 0; i < n; ++i) {
    int tmp = a[i];
    for (int j = 2; j * j <= tmp; ++j) {
      if (tmp > 1 && tmp % j == 0 && seen.count(j)) {
        pc = false;
        break;
      }
      while (tmp > 1 && tmp % j == 0) {
        seen.insert(j);
        tmp /= j;
      }
    }
    if (!pc) break;
  }
  if (pc)
    puts("pairwise coprime");
  else if (all == 1ll)
    puts("setwise coprime");
  else
    puts("not coprime");
}
