import java.util.Scanner;
public class Main{
public static void main
(String[] args
){ Scanner sc
= new Scanner
(System.
in); int n = sc.nextInt();
int k = sc.nextInt();
int sum = 0;
while(n > 0){
int rem = n % 10;
sum = sum + rem;
n = n/10;
}
System.
out.
println(sum
% k
== 0 ? "true" : "false"); }
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKcHVibGljIGNsYXNzIE1haW57CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKXsKCQlTY2FubmVyIHNjID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlpbnQgbiA9IHNjLm5leHRJbnQoKTsKCQlpbnQgayA9IHNjLm5leHRJbnQoKTsKCQlpbnQgc3VtID0gMDsKCQl3aGlsZShuID4gMCl7CgkJCWludCByZW0gPSBuICUgMTA7CgkJCXN1bSA9IHN1bSArIHJlbTsKCQkJbiA9IG4vMTA7CgkJfQoJCVN5c3RlbS5vdXQucHJpbnRsbihzdW0gJSBrID09IDAgPyAidHJ1ZSIgOiAiZmFsc2UiKTsKCX0KfQ==