Let's define a strange "distance" between two points a=(x_a,y_a,z_a) and b=(x_b,y_b,z_b) in three-dimensional space:
d(a,b)=max∣x_a−x_b∣,∣y_a−y_b∣,∣z_a−z_b∣⊕x_a⊕y_a⊕z_a⊕x_b⊕y_b⊕z_b,
where maxS, ∣x∣ and ⊕ correspond to the maximum value in S, the absolute value of x and the bitwise exclusive-or operator respectively.
Given 6 non-negative integers mx_a,my_a,mz_a,mx_b,my_b,mz_b, please find the sum of all d(a,b), where x_a∈\[0,mx_a],y_a∈\[0,my_a],z_a∈\[0,mz_a] and x_b∈\[0,mx_b],y_b∈\[0,my_b],z_b∈\[0,mz_b]. Since the sum may be very large, please output it modulo 230 instead.
Note that x_a,y_a,z_a,x_b,y_b,z_b should all be integers.
The input only contains 6 non-negative integers mx_a,my_a,mz_a,mx_b,my_b,mz_b, each integer is not larger than 109.
Output an integer denoting the sum modulo 230.