Game#663

Game

1 second
64 megabytes
Easy

Vasyl is playing his favorite RPG game. He has found a treasure chest containing slots, each with a bottle of healing potion. In addition, his character's belt contains pockets, each also containing a bottle. Each bottle restores a specific amount of health points.

Vasyl wants to maximize the total health points restored by the bottles on his belt by swapping some of the bottles in his belt with bottles from the chest. He can perform the following operation: swap a bottle from a chosen pocket of the belt with a bottle from a chosen slot of the chest.

Your task is to determine a sequence of operations that will maximize the total restored health points on Vasyl's belt.

Input

The first line contains and (1 \le N \le 1000, 1 \le M \le 1000). The next line contains integers, where the -th integer is the health points restored by the bottle in the -th pocket of the belt. The following line contains integers, where the -th integer is the health points restored by the bottle in the -th slot of the chest. All numbers are natural numbers not exceeding .

Output

First, output — the number of swap operations. It must not exceed . Then, output pairs of integers, each describing which bottles to swap: the first integer ( pocket ) is the number of the pocket on the belt, the second integer ( slot ) is the number of the slot in the chest. If there are multiple possible answers, any of them may be printed.

Examples

Example 1

Loading
Loading