def coordinate_of_sequence(sequence):
    """
    ___0__1__2__3__4__
    4| 1  2  3  4  5
    3| 6  7  8  9  10
    2| 11 12 13 14 15
    1| 16 17 18 19 20
    0| 21 22 23 24 25
    """

    y = 4 - ((sequence - 1) // 5)
    x = (sequence - 1) % 5

    return x, y