Groundhog Chasing Death
题号:NC208895
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

As we all know,"Groundhog chasing death" means "GCD",while "GCD" stands for "greatest common divisor".

So you need to calculate   modulo .

输入描述:

One line which contains six intergers .

输出描述:

One line which contains  modulo .
示例1

输入

复制
1 2 1 2 8 4

输出

复制
2048
示例2

输入

复制
1 2 3 4 120 180

输出

复制
235140177

备注:

.