#include <bits/stdc++.h>
using namespace std;
int a[1000000 + 1];
int N;
int main() {
  char c = getchar_unlocked();
  while (c > 47) {
    N = (N << 1) + (N << 3) + c - 48;
    c = getchar_unlocked();
  }
  for (int i = 0; i < N; ++i) {
    int x = 0;
    c = getchar_unlocked();
    while (c > 47) {
      x = (x << 1) + (x << 3) + c - 48;
      c = getchar_unlocked();
    }
    ++a[x];
  }
  int is_pairwise_coprime = 1;
  if (is_pairwise_coprime) {
    printf("pairwise coprime\n");
  } else {
    printf("setwise coprime\n");
  }
  return 0;
}
