#include <bits/stdc++.h>
using namespace std;
const int x = 1000005;
int arr[x];
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  int i;
  for (i = 0; i < n; i++) cin >> a[i];
  memset(arr, 0, sizeof(arr));
  for (i = 0; i < n; i++) arr[a[i]]++;
  bool only_one = true;
  for (i = 2; i < x; i++) {
    int cnt = 0;
    for (int j = i; j < x; j++) {
      cnt += arr[j];
    }
    if (cnt == n) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (cnt > 1) only_one = false;
  }
  if (only_one)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
  return 0;
}
