#include <bits/stdc++.h>
const double pi = acos(-1.0);
using namespace std;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
map<int, int> mp;
int main() {
  int n, x;
  scanf("%d", &n);
  for (int j = 1; j <= n; j++) {
    scanf("%d", &x);
    if (x == 1) mp[1]++;
    for (int i = 2; i * i <= x; i++) {
      if (x % i == 0) {
        int cnt = 0;
        while (x % i == 0) {
          cnt++;
          x /= i;
        }
        mp[i]++;
      }
    }
    if (x > 1) mp[x]++;
  }
  int f1 = 0, f2 = 0;
  for (auto i : mp) {
    if (i.second > 1) f1 = 1;
    if (i.second == n) f2 = 1;
  }
  if (!f1 || mp[1] == n)
    puts("pairwise coprime");
  else if (f2)
    puts("not coprime");
  else
    puts("setwise coprime");
  return 0;
}
