def check(base, xarr):
    ans = (xarr[0] * (base ** (n - 1)))
    if (ans > m):
        return False
    return True
def check(base, xarr):
    ans = (xarr[0] * (base ** (n - 1)))
    if (ans > m):
        return False
    return True