Write a program that, given two intervals, computes the interval corresponding to their intersection, or tells that it is empty.
Input consists of four integer numbers , , , that represent the intervals and . Assume and .
Print “[]” if their intersection is empty, or
“[,]”
if this is their non-empty intersection.
Input
20 30 10 40
Output
[20,30]
Input
10 20 10 20
Output
[10,20]
Input
20 30 10 20
Output
[20,20]
Input
10 20 30 40
Output
[]