def coordinateSelection(backyardWidth, backyardHeight):
    """
    This function takes and validates input from the user to
    select which position they want to search for the bone.
    It takes the width and height of the backyard as parameters.
    Valid data is: 2 digits separated by a space that represent <row> <column>.
    "-1" is to quit and all other input data is invalid.
    """
    print("\nTo do so, please, enter the row and the column number of a cell in which you suspect a bone is buried \n(e.g., 0 3 if you suspect that part of a bone is buried on the first row at the 4th column).")

    userInput = input("Enter -1 to quit : ")

    # check if user gave no input
    if len(userInput) == 0:
        print("***You have not entered anything. You need to enter a valid row and the column number!\n")
        return "invalid"
    # check if input is a string
    elif userInput.isalpha():
        print("***You have entered %s. You need to enter a valid row and the column number!\n" %userInput)
        return "invalid"
    else:
        # split input (string) into list
        userInput = userInput.split()
        # check if user wants to quit
        if int(userInput[0]) == -1:
            return "quit"
        # check if user entered only 1 value
        elif len(userInput) == 1:
            print("***You have entered only 1 value. You need to enter a valid row and the column number!\n")
            return "invalid"
        # check if user's input is out of range
        elif int(userInput[0]) >= backyardHeight :
            print("You needed to enter a row and column number of a cell that is within the backyard!\n")
            return "invalid"
        # check if user's input is out of range
        elif int(userInput[1]) >= backyardWidth:
            print("You needed to enter a row and column number of a cell that is within the backyard!\n")
            return "invalid"
        # check if user's input is out of range
        elif (int(userInput[0]) < 0) or (int(userInput[1]) < 0):
            print("You needed to enter a row and column number of a cell that is within the backyard!\n")
            return "invalid"
        # return valid data
        else:
            row = int(userInput[0])
            column = int(userInput[1])            
            return [row, column]