about summary refs log tree commit diff
path: root/9/Q-Huế-2014/bai1.pas
blob: 7bd0d92186c43a5ec0d4da25c6805b57aeaea946 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var
  n, m, p: qword;

begin
  read(n, m);

  while m <> 0 do
    begin
      p := n mod m;
      n := m;
      m := p
    end;

  writeln(n <> 1)
end.