#include <bits/stdc++.h>
using namespace std;
const int N = 2000010;
int a[N], st[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    int t = a[i];
    for (int j = 2; j * j <= t; ++j) {
      if (t % j == 0) {
        ++st[j];
        while (t % j == 0) t /= j;
      }
    }
  }
  bool F = true, S = true;
  for (int i = 1; i <= N; ++i) {
    if (st[i] > 1) F = false;
    if (st[i] >= n) S = false;
  }
  if (F)
    cout << "pairwise coprime\n";
  else if (S)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
