#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long INF = 1ll << 60;
const double pi = acos(-1);
const double eps = 1e-8;
const long long mod = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, -1, 0, 1};
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
const int M = 1000000;
int n;
bool a[M];
int main() {
  scanf("%d", &n);
  int g = 0;
  bool B = 1;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    g = gcd(g, x);
    for (int j = 2; j * j <= x; j++)
      if (x % j == 0) {
        while (x % j == 0) x /= j;
        if (a[j]) B = 0;
        a[j] = 1;
      }
  }
  if (B)
    cout << "pairwise coprime" << endl;
  else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
