4 5 1 4 0 1 1 0 1 2 2 1 1 2 1000 1 3 1000 2 3 1 3 4 1000 2 4 1000