#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int prime[1000033];
int main() {
  for (int i = 0; i < 1000033; ++i) {
    prime[i] = INT_MAX;
  }
  for (int i = 2; i < 1000033; ++i) {
    if (prime[i] == INT_MAX) {
      for (int j = i; j < 1000033; j += i) {
        prime[j] = min(i, prime[i]);
      }
    }
  }
  for (int i = 0; i < 10; ++i) {
    cout << prime[i] << " ";
  }
  cout << endl;
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  int f = 3;
  int gc = arr[0];
  for (int i = 1; i < n; ++i) {
    gc = gcd(gc, arr[i]);
  }
  if (gc == 1) f = 2;
  if (f == 2) {
    map<int, bool> m;
    int falg = 1;
    int num = prime[arr[0]];
    for (int i = 1; i < n; ++i) {
      if (num == prime[arr[i]] && num != INT_MAX) falg = 0;
    }
    if (falg == 1) f = 1;
  }
  if (f == 1)
    cout << "pairwise coprime";
  else if (f == 2)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  cout << endl;
  return 0;
}
