#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const int MOD = int(1e9) + 7;
using namespace std;
using pii = pair<int, int>;
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  long long r = x % y;
  while (r != 0) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
long long lcm(long long x, long long y) {
  long long a = x * y;
  return (a / gcd(x, y));
}
const int dy[] = {0, 1, 0, -1, -1, 1, 1, -1};
const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
signed main(void) {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  long long a[n + 5];
  for (int i = 1; i <= (n); i++) {
    cin >> a[i];
  }
  bool f;
  int memo = a[n];
  for (int i = 1; i <= (n - 1); i++) {
    int nasu = gcd(a[i], a[i + 1]);
    memo = gcd(memo, nasu);
    if (nasu != 1) {
      f = true;
    }
  }
  if (memo != 1) {
    cout << "not coprime";
  } else if (!f) {
    cout << "pairwise coprime";
  } else {
    cout << "setwise coprime";
  }
  return 0;
}
