#include int main(void) { int n,a,t,b,m=200000,i; scanf("%d%d",&n,&b); t=b; for(i=1;ia-t)m=a-t; t=a; } printf("%d\n%d",m,a-b); return 0; }