#include <bits/stdc++.h>
using namespace std;
int x, n, f1 = 1, f2 = 1;
map<int, int> mp;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    for (long long j = 2; j * j <= x; j++) {
      if (x % j == 0) mp[j] += 1;
      while (x % j == 0) x /= j;
    }
    if (x != 1) mp[x]++;
  }
  for (auto i : mp) {
    if (i.second > 1) f1 = 0;
    if (i.second >= n) {
      f2 = 0;
      break;
    }
  }
  if (f1 || f2)
    puts(f1 ? "pairwise coprime\n" : "setwise coprime\n");
  else
    puts("not coprime\n");
  return 0;
}
