import java.util.*;
public class Main {
public static void main (String args[]) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int[] nums = new int[n];
for (int i = 0; i < n; i++) {
nums[i] = scn.nextInt();
}
int count1 = 0, count2 = 0, Elem1 = 0, Elem2 = 0;
for (int i : nums) {
if (i == Elem1) {
count1++;
}
else if (i == Elem2) {
count2++;
}
else if (count1 == 0) {
Elem1 = i;
count1++;
}
else if(count2 == 0){
Elem2 = i;
count2++;
}
else{
count1--;
count2--;
}
}
//Verification
count1 =0; count2 =0;
for(int i : nums){
if(i == Elem1){
count1++;
}
else if( i == Elem2){
count2++;
}
}
if(count1 > count2){
System.out.println(Elem1);
}
else if(count2 > count1){
System.out.println(Elem2);
}
else if (count1 == count2){
System.out.println(Elem1 + " " + Elem2);
}
else{
System.out.println("No Majority Elements");
}
}
}