CF678F Lena and Queries

Description

Lena is a programmer. She got a task to solve at work. There is an empty set of pairs of integers and $ n $ queries to process. Each query is one of three types: 1. Add a pair $ (a,b) $ to the set. 2. Remove a pair added in the query number $ i $ . All queries are numbered with integers from $ 1 $ to $ n $ . 3. For a given integer $ q $ find the maximal value $ x·q+y $ over all pairs $ (x,y) $ from the set. Help Lena to process the queries.

Input Format

The first line of input contains integer $ n $ ( $ 1

Output Format

For the queries of the third type print on a separate line the desired maximal value of $ x·q+y $ . If there are no pairs in the set print "EMPTY SET".