#include <bits/stdc++.h>
using namespace std;
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];
  int j;
  j = gcd(a[0], a[1]);
  bool only_one = 1;
  if (j != 1) only_one = 0;
  for (i = 2; i < n; i++) {
    int x = gcd(a[0], a[i]);
    if (x % j == 0) {
    } else if (j % x == 0) {
      j = x;
    } else {
      j = 1;
    }
    if (j != 1) only_one = 0;
  }
  if (only_one)
    cout << "pairwise coprime";
  else if (j == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
