/**
#include <stdio.h>
typedef struct
{
int x;
int y;
} q;
int arr[1001][1001] = {};
q queue[100000];
int rear = -1, front = -1, n, m, sum = 0;
//front : 마지막으로 나간 데이터의 위치
//rear : 마지막으로 들어온 데이터의 위치
void enq(int x, int y)
{
if (x > m || x < 1 || y > n || y < 1 || arr[x][y] != 0)
{
return ;
}
sum ++;
rear ++;
queue[rear].x = x;
queue[rear].y = y;
arr[x][y] = 1;
}
void view()
{
int i, j;
for (i = 1 ; i <= m ; i ++)
{
for (j = 1 ; j <= n ; j ++)
{
printf("%d ", arr[i][j]);
}
printf("\n");
}
puts("");
}
int main()
{
int i, j, k;
scanf("%d %d", &n, &m);
int ax, ay;
for (i = 1 ; i <= m ; i ++)
{
for (j = 1 ; j <= n ; j ++)
{
scanf("%d", &arr[i][j]);
if (arr[i][j] == 1)
{
queue[++rear].x = i;
queue[rear].y = j;
}
}
}
if(rear==n*m){
printf("0");
return 0;
}
int day = 0, s = 0, e = 0;
while (front < rear)
{
int ooo = rear;
for (k = front + 1 ; k <= ooo ; k ++)
{
front ++;
int bx = queue[front].x;
int by = queue[front].y;
enq(bx, by - 1);
enq(bx + 1, by);
enq(bx, by + 1);
enq(bx - 1, by);
}
day ++;
}
for (i = 1 ; i <= m ; i ++)
{
for (j = 1 ; j <= n ; j ++)
{
if (arr[i][j] ==0)
{
printf("-1");
return 0;
}
}
}
printf("%d", day - 1);
return 0;
}
**/
#include <stdio.h>
typedef struct
{
int x;
int y;
} q;
int i, j, k, n, m, a, b, t_x, t_y, ax, ay;
int arr[101][101] = {};
q queue[1001] = {};
int rear = -1, front = -1;
int main()
{
scanf("%d", &n);
scanf("%d %d", &a, &b);
rear ++;
queue[rear].x = a;
queue[rear].y = b;
scanf("%d %d", &t_x, &t_y);
while (front != rear)
{
front ++;
ax = queue[front].x;
ay = queue[front].y;
}
return 0;
}