#abc309f. F - Box in Box
F - Box in Box
Score : points
问题描述
有 个箱子。第 个箱子的形状为长方体,其高度、宽度和深度分别为 和 。
确定是否存在两个箱子,在必要时经过旋转后,其中一个箱子的高度、宽度和深度严格大于另一个箱子的对应尺寸。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
There are boxes. The -th box has a shape of a rectangular cuboid whose height, width, and depth are , and , respectively.
Determine if there are two boxes such that one's height, width, and depth are strictly greater than those of the other after rotating them if necessary.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if there are two boxes such that one's height, width, and depth are strictly greater than those of the other after rotating them if necessary; print No
otherwise.
Sample Input 1
3
19 8 22
10 24 12
15 25 11
Sample Output 1
Yes
If you rotate the -nd box to swap its height and depth, the -rd box will have greater height, depth, and width.
Sample Input 2
3
19 8 22
10 25 12
15 24 11
Sample Output 2
No
Sample Input 3
2
1 1 2
1 2 2
Sample Output 3
No
update @ 2024/3/10 08:46:48