int speedDis1(int x,int y,int n,int m){ while (x