#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[1000010];
  int p, ans;
  cin >> n;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  ans = 0;
  for (int j = (2); j <= (int)(1010); j++) {
    p = 0;
    for (int i = 0; i < (int)(n); i++) {
      if (a[i] % j == 0) p++;
    }
    if (p == n) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (p > 1) ans = 2;
  }
  if (ans == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  cout << "setwise coprime" << endl;
  return 0;
}
