#include<iostream>
#include <numeric>
using namespace std;

int main() {
  unsigned long long n;
  unsigned long long a[1000010];
  cin >> n;
  for (unsigned long long i = 0; i < n; i++) cin >> a[i];
  unsigned long long pw_ok = 1;
  unsigned long long pw = a[0];
  unsigned long long sw = a[0];
  unsigned long long g;
  for (unsigned long long i = 1; i < n; i++) {
    sw = gcd(sw, a[i]);
    g = gcd(pw, a[i]);
    if (g != 1) pw_ok = 0;
    pw = pw*a[i]/g;
  }
  if (pw_ok) {
    cout << "pairwise coprime" << endl;
  } else if (sw == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
