#include <bits/stdc++.h>
long long gys(long long, long long);
long long n, a[int(1e6) + 10], min, max;
bool pc = true, sc = true;
int main() {
  min = 0x7fffffff;
  max = 0;
  std::ios::sync_with_stdio(false);
  std::cin >> n;
  for (long long i = 1; i <= n; ++i)
    std::cin >> a[i], max = std::max(max, a[i]), min = std::min(min, a[i]);
  for (long long i = 2; i <= sqrt(max) + 10 && pc; ++i) {
    long long temp = 0;
    for (long long j = 1; j <= n && temp < 2; ++j) {
      if (a[j] % i == 0) ++temp;
    }
    if (temp > 1) pc = false;
  }
  if (pc) {
    std::cout << "pairwise coprime";
    return 0;
  }
  for (long long i = 2; i <= sqrt(min) + 10; ++i) {
    bool ssc = true;
    for (long long j = 1; j <= n && ssc; ++j) {
      if (a[j] % i != 0) ssc = false;
    }
    if (ssc) sc = false;
  }
  if (sc)
    std::cout << "setwise coprime";
  else
    std::cout << "not coprime";
  return 0;
}
long long gys(long long x, long long y) { return (y == 0) ? x : gys(y, x % y); }
