#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int a[N];
int cnt[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cnt[j]++;
        while (a[i] % j == 0) {
          a[i] = a[i] / j;
        }
      }
    }
    if (a[i] > 1) cnt[a[i]]++;
  }
  int temp = 0;
  for (int i = 2; i <= 10; i++) {
    temp = max(temp, cnt[i]);
  }
  if (temp == n) {
    cout << "not coprime\n";
  } else if (temp > 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "pairwise coprime\n";
  }
  return 0;
}
