#T2. 拦截导弹

拦截导弹

Description

A certain country has developed a missile interception system to defend against enemy missile attacks. However, this system has a flaw: while its first projectile can reach any height, each subsequent projectile cannot exceed the height of the previous one.

One day, radar detects incoming enemy missiles. Since the system is still in the trial phase, only one set is available, which may not be able to intercept all the missiles. Given the sequence of missile heights (the radar provides height data as positive integers no greater than 30,000, with the number of missiles not exceeding 1,000), calculate:

  1. The maximum number of missiles this system can intercept.
  2. The minimum number of such systems required to intercept all the missiles.

Input Format

Input the sequence of missile heights in the order they arrive.

Output Format

First line: The maximum number of missiles that can be intercepted.
Second line: The minimum number of systems required to intercept all the missiles.

389 207 155 300 299 170 158 65

6
2