#include <bits/stdc++.h>
void cek(int angka[]) {
  int i, j = 0, count = 0, jum[5], ang[5];
  for (i = 0; i < 101; i++) {
    if (angka[i] != 0) {
      count++;
      ang[j] = i;
      jum[j++] = angka[i];
    }
  }
  if (count == 2 && jum[0] == jum[1]) {
    printf("YES\n%d %d\n", ang[0], ang[1]);
  } else {
    printf("NO\n");
  }
}
int main() {
  int n, arr[200], angka[105] = {0};
  scanf("%d", &n);
  int i;
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    angka[arr[i]] += 1;
  }
  cek(angka);
  return 0;
}
