#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e7 + 10;
int n, a[maxn], p[maxn], b[maxn];
vector<int> v;
void init() {
  for (int i = 2; i < 1000006; i++) {
    if (p[i]) continue;
    v.push_back(i);
    for (int j = i * i; j < 1000006; j += i) p[j] = 1;
  }
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  init();
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int x = a[1];
  for (int i = 2; i <= n; i++) x = gcd(a[i], x);
  if (x != 1)
    cout << "not coprime";
  else {
    bool flag = true;
    for (int i = 1; i <= n; i++) {
      int x = a[i], j = 0;
      while (x > 1) {
        if (x % v[j] == 0 && b[v[j]]) {
          flag = false;
          break;
        }
        while (x % v[j] == 0) x /= v[j], b[v[j]] = 1;
        j++;
      }
      if (!flag) break;
    }
    if (flag)
      cout << "pairwise coprime";
    else
      cout << "setwise coprime";
  }
  return 0;
}
