players are participating in a round-robin tournament (each player plays against another player exactly once). Each player in the tournament is assigned a popularity index, a positive integer between and inclusive. The number of tickets sold in the game between two players is equal to the product of their popularity indices. Find the last three digits of the total number of tickets sold in the tournament.
Example
Say players are participating in a tournament. The following table lists their popularity indices.
The following table lists the number of tickets sold in each game.
The total number of tickets sold is
Input file
This file contains lines with a positive integer between and in each line. The number written in the line denotes the popularity index of player