#!/usr/bin/env python3
# from typing import *

# def solve(N: int, a: List[int]) -> Tuple[str, List[str], List[str]]:
def solve(N, a):
    pass  # TODO: edit here

# generated by online-judge-template-generator v4.1.0 (https://github.com/kmyk/online-judge-template-generator)
def main():
    import sys
    tokens = iter(sys.stdin.read().split())
    N = int(next(tokens))
    a = [None for _ in range(N)]
    for i in range(N):
        a[i] = int(next(tokens))
    assert next(tokens, None) is None
    uqz, aap, fvc = solve(N, a)
    print(uqz)
    for i in range(uqz):
        print(aap[i], fvc[i])

if __name__ == '__main__':
    main()
