#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int64_t dr8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int64_t dc8[] = {0, 1, 1, 1, 0, -1, -1, -1};
int64_t dr4[] = {1, 0, 0, -1};
int64_t dc4[] = {0, 1, -1, 0};
int64_t gcd(int64_t a, int64_t b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int64_t findMaxGCD(vector<int64_t> arr, int64_t n) {
  int64_t high = 0;
  for (int64_t i = 0; i < n; i++) high = max(high, arr[i]);
  vector<int64_t> divisors(high + 1, 0);
  for (int64_t i = 0; i < n; i++) {
    for (int64_t j = 1; j <= sqrt(arr[i]); j++) {
      if (arr[i] % j == 0) {
        divisors[j]++;
        if (j != arr[i] / j) divisors[arr[i] / j]++;
      }
    }
  }
  for (int64_t i = high; i >= 1; i--) {
    if (divisors[i] > 1) return i;
  }
  return 1;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int64_t i, n, j, m, k, l, t;
  {
    cin >> n;
    vector<int64_t> v(n);
    for (i = 0; i < n; i++) cin >> v[i];
    k = findMaxGCD(v, n);
    if (k != 1) {
      t = v[0];
      for (i = 0; i < n; i++) t = gcd(t, v[i]);
      if (t == 1)
        cout << "setwise coprime";
      else
        cout << "not coprime";
    } else
      cout << "pairwise coprime";
  }
}
