import java.util.Scanner;
public class Randm {
public static void main(String[] args) {
int [] a = new int [10];
for(int i = 0; i < a.length; i++){
a[i] = (int)(100* Math.random());
System.out.print(a[i]+",");
}
Scanner input = new Scanner(System.in);
int x = input.nextInt(),y = input.nextInt();
int minindexx = 0,minindexy = 0;
int []b = new int[a.length];
int []c = new int[a.length];
for(int i=0; i<a.length; i++){
b[i] = Math.abs(a[i] - x);
c[i] = Math.abs(a[i] - y);
}
int minx = b[0],miny = c[0];
for(int j=0; j<a.length; j++){
if(b[j]<minx){
minx = b[j];
minindexx = j;
}
if(c[j]<miny){
miny = c[j];
minindexy = j;
}
}
System.out.println("离第一个数最近的是:"+a[minindexx]);
System.out.println("离第二个数最近的是:"+a[minindexy]);
}
}