Game
Vasya, a young adventurer, is playing his favorite RPG game. He has discovered a treasure chest containing M slots, each filled with a bottle of healing potion. Additionally, his character's belt has N pockets, each also holding a bottle. Every bottle restores a specific number of health points.
Vasya's goal is to maximize the total health points restored by the bottles on his belt by swapping some of the bottles in his belt pockets with those from the chest. He can perform the following operation: swap a bottle from a designated pocket on the belt with a bottle from a designated slot in the chest.
Your task is to determine the sequence of swaps that will maximize the total health points restored by the bottles on Vasya's belt.
Input
The input begins with two integers, N and M (1 ≤ N ≤ 1000, 1 ≤ M ≤ 1000). Following this, there are N integers, where the i-th integer represents the health points restored by the bottle in the i-th pocket of the belt. Next, there are M integers, where the j-th integer represents the health points restored by the bottle in the j-th slot of the chest. All health points are natural numbers not exceeding 10000.
Output
First, output K, the number of swap operations, which must not exceed 100000. Then, provide K pairs of numbers, each indicating which bottles to swap: the first number (ranging from 1 to N) specifies the pocket number on the belt, and the second number (ranging from 1 to M) specifies the slot number in the chest. If multiple solutions exist, you may output any valid one.