#import int n,i,c,m,a[2000];main(){for(scanf("%d",&n);i