#include<stdio.h>
int main(void){
  long int i,j,k,n,m,a[100000], b[100000], h[100000];
  scanf("%ld%ld", &n, &m);
  for(i=1;i<=n;i++){
    scanf("%ld", &h[i]);
  }
  for(j=1;j<=m;j++){
    scanf("%ld%ld", &a[i], &b[i]);
  }
  for(k=1;k<=n;k++){
  }
  return 0;
}
  
 
  
