def c_exam_and_wizard(N, A, B):

    ans = 0

    short_val = 0  # 合格に不足する準備度

    can_give = []

    for a, b in zip(A, B):

        if a < b:

            ans += 1

            short_val += b - a

        elif a > b:

            can_give.append(a - b)



    if short_val == 0:

        return 0

    can_give.sort()



    idx = len(can_give) - 1

    while True:

        if not can_give:

            ans = -1

            break



        if can_give[idx] >= short_val:

            ans += 1

            break



        short_val -= can_give[idx]

        can_give.pop()

        ans += 1

        idx -= 1

    return ans



N = int(eval(input()))

A = [int(i) for i in input().split()]

B = [int(i) for i in input().split()]

print((c_exam_and_wizard(N, A, B)))
def c_exam_and_wizard(N, A, B):

    ans = 0

    sum_of_shortage_for_passing_mark = 0

    campensation_for_shortage = []

    for a, b in zip(A, B):

        if a < b:

            ans += 1

            sum_of_shortage_for_passing_mark += b - a

        elif a > b:

            campensation_for_shortage.append(a - b)



    if sum_of_shortage_for_passing_mark == 0:

        return 0  # 準備度を変更するまでもない



    campensation_for_shortage.sort(reverse=True)  # A_i-B_iが大きなiから分けていく

    for pts in campensation_for_shortage:

        if pts >= sum_of_shortage_for_passing_mark:

            ans += 1

            break



        sum_of_shortage_for_passing_mark -= pts

        ans += 1

    else:

        ans = -1

    return ans



N = int(eval(input()))

A = [int(i) for i in input().split()]

B = [int(i) for i in input().split()]

print((c_exam_and_wizard(N, A, B)))
def c_exam_and_wizard(N, A, B):
    ans = 0
    short_val = 0  # 合格に不足する準備度
    can_give = []
    for a, b in zip(A, B):
        if a < b:
            ans += 1
            short_val += b - a
        elif a > b:
            can_give.append(a - b)
    if short_val == 0:
        return 0
    can_give.sort()
    idx = len(can_give) - 1
    while True:
        if not can_give:
            ans = -1
            break
        if can_give[idx] >= short_val:
            ans += 1
            break
        short_val -= can_give[idx]
        can_give.pop()
        ans += 1
        idx -= 1
    return ans


N = int(eval(input()))
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
print((c_exam_and_wizard(N, A, B)))

def c_exam_and_wizard(N, A, B):
    ans = 0
    sum_of_shortage_for_passing_mark = 0
    campensation_for_shortage = []
    for a, b in zip(A, B):
        if a < b:
            ans += 1
            sum_of_shortage_for_passing_mark += b - a
        elif a > b:
            campensation_for_shortage.append(a - b)
    if sum_of_shortage_for_passing_mark == 0:
        return 0  # 準備度を変更するまでもない
    campensation_for_shortage.sort(reverse=True)  # A_i-B_iが大きなiから分けていく
    for pts in campensation_for_shortage:
        if pts >= sum_of_shortage_for_passing_mark:
            ans += 1
            break
        sum_of_shortage_for_passing_mark -= pts
        ans += 1
    else:
        ans = -1
    return ans


N = int(eval(input()))
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
print((c_exam_and_wizard(N, A, B)))

-    short_val = 0  # 合格に不足する準備度 -    can_give = [] +    sum_of_shortage_for_passing_mark = 0 +    campensation_for_shortage = [] -            short_val += b - a +            sum_of_shortage_for_passing_mark += b - a -            can_give.append(a - b) -    if short_val == 0: -        return 0 -    can_give.sort() -    idx = len(can_give) - 1 -    while True: -        if not can_give: -            ans = -1 -            break -        if can_give[idx] >= short_val: +            campensation_for_shortage.append(a - b) +    if sum_of_shortage_for_passing_mark == 0: +        return 0  # 準備度を変更するまでもない +    campensation_for_shortage.sort(reverse=True)  # A_i-B_iが大きなiから分けていく +    for pts in campensation_for_shortage: +        if pts >= sum_of_shortage_for_passing_mark: -        short_val -= can_give[idx] -        can_give.pop() +        sum_of_shortage_for_passing_mark -= pts -        idx -= 1 +    else: +        ans = -1