Hold of the barge, which has a square with a side of С (С = 1..1000), divided into numbered from left to right along the lines of unit squares (cells), which contain flammable goods. At midnight due to a thunderstorm lit up the cell with the number N. Each cell burns 1 min, and then the fire is thrown into all adjacent cells via the common side. How many hours (G) and minutes (H) lasted for a fire, if the entire cargo burned?
Two positive integers С and N (N = 1..C2).
Two non-negative integers, G and H (the number of hours and minutes).