my $a = get.words>>.Int; say $a[0] * $a[1] % $a[3] * $a[2] % $a[3];