#include <bits/stdc++.h>
using namespace std;
long long gcd(long long m, long long n) {
  long long tmp;
  while (m % n) {
    tmp = n;
    n = m % n;
    m = tmp;
  }
  return n;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> a(n);
  bool flg = true;
  long long g, h;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    if (i == 0) {
      g = a[i];
      h = a[i];
    } else {
      g = gcd(g, a[i]);
      h = gcd(a[i - 1], a[i]);
      if (h > 1) flg = false;
    }
  }
  if (flg) {
    puts("pairwise coprime");
    return 0;
  }
  if (g > 1) {
    puts("not coprime");
    return 0;
  }
  puts("setwise coprime");
  return 0;
}
