#include <bits/stdc++.h>
using namespace std;
int power(long long x, long long y) {
  if (y == 0) return 1;
  long long p = power(x, y / 2);
  p = (p * p);
  return (y % 2 == 0) ? p : (x * p);
}
const long long N = (long long)(1e5 + 1);
const long long N2 = (long long)(1e6 + 1);
const long long MOD = (long long)(1e9 + 7);
const long long INF = (long long)(2e18);
int gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  long long f2 = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) {
      f2 = 1;
    }
  }
  set<long long> s;
  long long f = 0;
  for (long long i = 0; i < n; i++) {
    long long x = a[i];
    if (x != 1) {
      if (ceil(log2(x)) == floor(log2(x))) {
        if (s.find(2) == s.end()) {
          s.insert(2);
        } else {
          f = 1;
          break;
        }
      } else {
        for (long long j = 2; j <= sqrt(x); j++) {
          if (x % j == 0) {
            if (s.find(j) != s.end()) {
              f = 1;
              break;
            } else {
              s.insert(j);
              while (x % j == 0) {
                x = x / j;
              }
            }
          }
        }
      }
    }
    if (f == 1) {
      break;
    }
  }
  if (f == 0) {
    cout << "pairwise coprime";
  } else {
    long long g = a[0];
    for (long long i = 1; i < n; i++) {
      g = gcd(a[i], g);
      if (g == 1) {
        break;
      }
    }
    if (g == 1) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
