#include <bits/stdc++.h>
using namespace std;
int n, a[3000003], b[3000003], d[3000003], ans = 1, g = -1;
int gcd(int x, int y) {
  if (x > y) swap(x, y);
  if (x == 0) return y;
  return gcd(y % x, x);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
    if (g == -1)
      g = b[i];
    else
      g = gcd(b[i], g);
    while (a[i] > 0) {
      int x = a[i], f = 0;
      for (int j = 2; j <= sqrt(x); j++) {
        if (a[i] % j == 0 && d[j]) ans = 0;
        while (a[i] % j == 0) {
          f = 1;
          a[i] /= j;
          d[j] = 1;
        }
      }
      if (!f) {
        d[a[i]] = 1;
        break;
      }
    }
  }
  if (ans) {
    cout << "pairwise coprime\n";
    return 0;
  } else if (g == 1) {
    cout << "setwice coprime\n";
    return 0;
  }
  cout << "not coprime\n";
}
