#include <bits/stdc++.h>
using namespace std;
int n, a[3000003], b[3000003], d[3000003], p[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[a[i]]++;
    if (g == -1)
      g = a[i];
    else
      g = gcd(a[i], g);
  }
  for (int i = 0; i < n; i++) {
    int x = a[i];
    while (x > 0) {
      int q = 0;
      for (int j = 2; j <= sqrt(a[i]); j++) {
        int f = 0;
        while (x % j == 0) {
          f = 1;
          q = 1;
          x /= j;
        }
        if (f) {
          if (d[j]) ans = 0;
          d[j]++;
        }
      }
      if (!q) {
        if (d[x] && x != 1) ans = 0;
        d[x]++;
        break;
      }
      a[i] = x;
    }
  }
  if (ans) {
    cout << "pairwise coprime\n";
    return 0;
  } else if (g == 1) {
    cout << "setwice coprime\n";
    return 0;
  }
  cout << "not coprime\n";
}
