#include <bits/stdc++.h>
using namespace std;
int a[1000005];
int main() {
  int n;
  cin >> n;
  bool set = false, pair = false;
  int num;
  for (int i = 0; i < n; ++i) {
    cin >> num;
    for (int j = 2; j <= num / 2; ++j) {
      if (num % j == 0) {
        ++a[j];
        while (num >= j) {
          if (num % j == 0) {
            num /= j;
          } else
            break;
        }
      }
    }
    ++a[num];
  }
  for (int i = 2; i <= 1000000; ++i)
    if (a[num] == n) {
      cout << "not coprime\n";
      return 0;
    } else if (a[num] >= 2)
      pair = true;
  if (pair)
    cout << "setwise coprime\n";
  else
    cout << "pairwise coprime\n";
  return 0;
}
