#P171H. A polyline

    ID: 7639 远端评测题 2000ms 256MiB 尝试: 0 已通过: 0 提高+/省选- 上传者: 标签>*special problemimplementation*1700

A polyline

Description

The input contains two integers a, b (1 ≤ a ≤ 10, 0 ≤ b ≤ 2a - 1) separated by a single space.

Output two integers separated by a single space.

Input

The input contains two integers a, b (1 ≤ a ≤ 10, 0 ≤ b ≤ 2a - 1) separated by a single space.

Output

Output two integers separated by a single space.

1 0

2 15

4 160

0 0

3 0

12 12