Problem Description

Two JSON values are given on two lines: schema and value. Schema has field type (number|string|boolean|null|array|object). For array, schema can have items. For object, schema can have props and required list. Extra keys are allowed. Print YES if value matches schema else NO.

Input Format

Line1: schema JSON. Line2: value JSON.

Output Format

YES or NO.

Sample Test Case

Input:
{"type":"array","items":{"type":"number"}} [1,2,3]
Output:
YES

Constraints

Total schema+value nodes up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next