#include <bits/stdc++.h>
using namespace std;
map<int, bool> ex;
const int N = 1e6 + 10;
int arr[N];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  int g = -1;
  int pc = 1;
  for (int i = 1; i <= n; i++) {
    int num = arr[i];
    if (g == -1)
      g = num;
    else
      g = gcd(g, num);
    for (long long j = 2; j * j <= num && pc; j++) {
      if (num % j == 0) {
        if (ex.count(j)) {
          pc = 0;
          break;
        } else {
          ex[j] = true;
          while (num && num % j == 0) {
            num /= j;
          }
          if (num != 1 && ex.count(num)) {
            pc = 0;
            break;
          } else if (num != 1)
            ex[num] = true;
        }
      }
    }
  }
  if (pc == 1)
    cout << "pairwise coprime";
  else if (g == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
