#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
long long int n, a[N];
long long int gcd(long int a, long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main(void) {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  int flag = 0;
  long long int p = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  p = a[0];
  for (int i = 0; i < n; i++) {
    p = gcd(p, a[0]);
    if (p != 1) flag = 1;
  }
  if (p != 1)
    cout << "not coprime" << endl;
  else if (p == 1 && flag == 1)
    cout << "setwise coprime" << endl;
  else if (p == 1 && flag == 0)
    cout << "pairwise coprime" << endl;
  return 0;
}
