#include int main(void){ int N; scanf("%d",&N); int max=1; int min=1000; scanf("%*d"); while(N>0){ int n; scanf("%d",&n); max=n>max?n:max; min=n