Codeforces Round 232 (Div. 2)


A. On Segment's Own Points
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
0 5
2 8
1 6
Output
1
Input
3
0 10
1 5
7 15
Output
3
----------------------------------------------------------------------------------------------------
B. On Corruption and Numbers
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
5 2 3
6 4 5
Output
Yes
No
----------------------------------------------------------------------------------------------------
C. On Number of Decompositions into Multipliers
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
15
Output
1
Input
3
1 1 2
Output
3
Input
2
5 7
Output
4
----------------------------------------------------------------------------------------------------
D. On Sum of Fractions
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
2
3
Output
1/6
7/30
----------------------------------------------------------------------------------------------------
E. On Changing Tree
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 1
3
1 1 2 1
2 1
2 2
Output
2
1
----------------------------------------------------------------------------------------------------
