def checkinput(coords):
    """
    Checks if the input is in the format X Y and returns True
    else returns False.
    X and Y must be numbers separated by one space only.
    """
    if coords.startswith(' ') or coords.endswith(' '):
        return False
    for i in range(0, len(coords)): #checks first part of input if numerical
        if coords[i].isdigit():
            continue
        else:
            if coords[i] == ' ':    #determines if the second part is numerical
                for j in range(len(coords)-1, i, -1):
                    if coords[j].isdigit():
                        continue
                    else:
                        return False
                return True
            else:
                return False
    return False