#include <bits/stdc++.h>
using namespace std;
long long fact(long long n) {
  long long sum = 1;
  for (long long i = 1; i <= n; i++) {
    sum *= i;
  }
  return sum;
}
long long ncr(long long n, long long r) {
  return fact(n) / (fact(r) * fact(n - r));
}
long long gcd(long long a, long long b) {
  for (long long i = min(a, b); i >= 1; i--) {
    if (a % i == 0 && b % i == 0) {
      return i;
      break;
    }
  }
}
int main() {
  long long n;
  cin >> n;
  long long a[n + 10];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long onegcd = 0;
  for (long long i = 0; i < n - 1; i++) {
    for (long long j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) == 1) {
        onegcd++;
      }
    }
  }
  if (onegcd == ncr(n, 2)) {
    cout << "pairwise coprime" << endl;
  } else {
    long long setgcd = gcd(a[0], a[1]);
    if (n > 1) {
      for (long long i = 2; i < n; i++) {
        setgcd = gcd(setgcd, a[i]);
      }
    }
    if (setgcd == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
