← Home
For problem statement at 0-999/700-799/780-789/787/problemA.txt this is a correct solution, but verifier at 0-999/700-799/780-789/787/verifierA.go ends with All tests passed can you fix the verifier? ```go
package main

import (
	"fmt"
)

func main() {
	var a, b, c, d int
	fmt.Scan(&a, &b)
	fmt.Scan(&c, &d)

	for i := 0; i <= 10000; i++ {
		for j := 0; j <= 10000; j++ {
			if b+i*a == d+j*c {
				fmt.Println(b + i*a)
				return
			}
		}
	}
	fmt.Println(-1)
}
```