#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool prime(long long int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> ans(n);
  long long int g = 0, flag = 0;
  map<int, int> mp;
  for (long long int i = 0; i < n; i++) {
    cin >> ans[i];
    mp[ans[i]]++;
    if (mp[ans[i]] > 1) flag = 1;
  }
  int c = 0;
  for (long long int i = 0; i < n; i++) {
    g = gcd(g, ans[i]);
    if (prime(ans[i])) c++;
  }
  if (g != 1 || flag == 1)
    cout << "not coprime" << endl;
  else if (c == n) {
    cout << "pairwise coprime" << endl;
  } else
    cout << "setwise coprime" << endl;
}
