#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int binaryS(int x, int sb[], int m) {
  int l = 0, r = m;
  int mid = (l + r) / 2;
  while (l < r) {
    mid = (l + r) / 2;
    if (sb[mid] < x)
      l = mid + 1;
    else if (sb[mid] > x)
      r = mid - 1;
    else
      return mid;
  }
  return l;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int pf[1000001];
  for (__typeof(0) i = 0; i < 1000001; i++) pf[i] = i;
  for (__typeof(2) i = 2; i < 500001; i++) {
    if (pf[i] == i) {
      for (int j = i; j <= 1000001; j += i) {
        if (pf[j] == j) {
          pf[j] = i;
        }
      }
    }
  }
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  unordered_map<int, int> mp;
  bool al = true, pairw = true;
  int c = pf[arr[0]];
  for (__typeof(0) i = 0; i < n; i++) {
    mp[pf[arr[i]]]++;
    if (mp[pf[arr[i]]] > 1) pairw = false;
    if (pf[arr[i]] != c) al = false;
  }
  if (pairw)
    cout << "pairwise coprime";
  else if (!al)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
