#include <bits/stdc++.h>
using namespace std;
void FAST() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int gcd(int a, int b) {
  if (b == 0) return a;
  a = a % b;
  gcd(b, a);
}
int main() {
  FAST();
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  long long ans1 = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      ans1 = gcd(arr[i], arr[j]);
      if (ans1 != 1) break;
    }
    if (ans1 != 1) break;
  }
  if (ans1 != 1) {
    long long ans = gcd(arr[0], arr[1]);
    for (long long i = 2; i < n; i++) {
      ans = gcd(ans, arr[i]);
    }
    if (ans == 1) {
      cout << "setwise coprime";
      return 0;
    }
    cout << "not coprime";
  } else
    cout << "pairwise coprime";
  return 0;
}
