CF159E Zebra Tower

Description

Little Janet likes playing with cubes. Actually, she likes to play with anything whatsoever, cubes or tesseracts, as long as they are multicolored. Each cube is described by two parameters — color $ c_{i} $ and size $ s_{i} $ . A Zebra Tower is a tower that consists of cubes of exactly two colors. Besides, the colors of the cubes in the tower must alternate (colors of adjacent cubes must differ). The Zebra Tower should have at least two cubes. There are no other limitations. The figure below shows an example of a Zebra Tower. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF159E/f33171cfff84c23150eb82e578a37293690a12de.png)A Zebra Tower's height is the sum of sizes of all cubes that form the tower. Help little Janet build the Zebra Tower of the maximum possible height, using the available cubes.

Input Format

N/A

Output Format

N/A