#include <bits/stdc++.h>
using namespace std;
int cnt[100005], a[100005];
int gcd(int a, int b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  int n, f1 = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    int t = a[i];
    for (int j = 2; j * j <= t; j++) {
      if (t % j == 0) {
        while (t % j == 0) t /= j;
        cnt[j]++;
      }
    }
    if (t > 1) cnt[t]++;
  }
  for (int i = 2; i <= 100000; i++)
    if (cnt[i] > 1) {
      f1 = 0;
      break;
    }
  if (f1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int now = a[1];
  for (int i = 2; i <= n; i++) now = gcd(now, a[i]);
  if (now == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
