#K69172. Time Limit Check

    ID: 33028 Type: Default 1000ms 256MiB

Time Limit Check

Time Limit Check

Maria is participating in a coding contest and she has solved several subproblems. For each subproblem, there is a specific time limit. Your task is to determine whether Maria managed to solve each subproblem within its designated time limit. Note that if the time taken is exactly equal to the prescribed time limit, it is considered within the limit.

The problem can be formally stated as follows:

Given an integer \(N\) representing the number of subproblems, an array \(time\_limits\) of \(N\) integers specifying the maximum allowed time for each subproblem, and an array \(time\_taken\) of \(N\) integers indicating the time Maria took for each corresponding subproblem, determine whether Maria solved every subproblem within or exactly at the time limit.

If all subproblems are solved on time, print Yes; otherwise, print No.

inputFormat

The input is read from standard input (stdin) and consists of three parts separated by whitespace:

  1. An integer (N) representing the number of subproblems.
  2. (N) integers representing the time limits for each subproblem.
  3. (N) integers representing the time taken by Maria to solve each subproblem.

All values are space-separated or provided in separate lines.

outputFormat

Output to standard output (stdout) a single line containing either "Yes" if Maria solved every subproblem within or exactly at the time limit, or "No" otherwise.## sample

3
10 15 20
8 14 19
Yes