#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int n, x;
map<int, int> mp;
bool ok = true, ok2 = true;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    for (int j = 2; j * j <= x; j++) {
      if (x % j > 0) continue;
      mp[j]++;
      while (x % j == 0) x /= j;
    }
  }
  for (map<int, int>::iterator it = mp.begin(); it != mp.end(); it++) {
    if ((it->second) > 1) ok = false;
    if ((it->second) == n) ok2 = false;
  }
  if (ok)
    puts("pairwise coprime");
  else if (ok2)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
