package main import . "fmt" func main() { var n,k int64 Scan(&n,&k) var c int for i:=int64(1);i*i<=n;i++ { if (n-k)%i!=0 { continue } a1:=i+k a2:=(n-k)/i+k if n%a1==k { c++ } if a1!=a2&&n%a2==k{ c++ } } Println(c) }