#include <bits/stdc++.h>
int gcd(int m, int n) {
  if ((0 == m) || (0 == n)) return 0;
  while (m != n)
    if (m > n)
      m = m - n;
    else
      n = n - m;
  return m;
}
int lcm(int m, int n) {
  if ((0 == m) || (0 == n)) return 0;
  return (m * n / gcd(m, n));
}
int fact(int x) {
  if (x == 1)
    return (x);
  else
    return (x * fact(x - 1));
}
int ruijou(int base, int exponent) {
  int i, answer = 1;
  i = exponent;
  while (i != 0) {
    answer = answer * base;
    --i;
  }
  return answer;
}
long long int llgcd(long long int m, long long int n) {
  if ((0 == m) || (0 == n)) return 0;
  while (m != n)
    if (m > n)
      m = m - n;
    else
      n = n - m;
  return m;
}
long long int lllcm(long long int m, long long int n) {
  if ((0 == m) || (0 == n)) return 0;
  return (m * n / llgcd(m, n));
}
long long int llfact(long long int x) {
  if (x == 1)
    return (x);
  else
    return (x * llfact(x - 1));
}
int llruijou(long long int base, long long int exponent) {
  long long int i, answer = 1;
  i = exponent;
  while (i != 0) {
    answer = answer * base;
    --i;
  }
  return answer;
}
int main() {
  long long n, a[1000010], count = 0;
  scanf("%lld", &n);
  long long minmin = 1000000;
  for (long long i1 = 1; i1 <= n; i1++) {
    scanf("%lld", &a[i1]);
    minmin = ((minmin) < (a[i1]) ? (minmin) : (a[i1]));
  }
  for (long long i = 1; i < n; i++) {
    for (long long j = i + 1; j <= n; j++) {
      if (llgcd(a[i], a[j]) != 1) {
        count++;
        break;
      }
    }
  }
  if (count == 0) {
    printf("pairwise coprime\n");
  } else if (count != 0) {
    long long ahaha = 0;
    for (long long k = minmin / 2; k > 1; k--) {
      long long count2 = 0;
      for (long long k2 = 1; k2 <= n; k2++) {
        if (a[k2] % k == 0) {
          count2++;
        }
      }
      if (count2 == n) {
        ahaha++;
        break;
      }
    }
    if (ahaha == 0) {
      printf("not coprime\n");
    } else {
      printf("setwise coprime\n");
    }
  }
  return 0;
}
