编辑代码

function solution(a,b)
local num1=0
local e=0
for i=1,a-1 do
   if a%i==0 then
   e=e+i
   end
end
    if e==b then
        print("yes")
    end
    if e~=b then
        print("no")
    end
end

a=io.read("*n")
b=io.read("*n")
solution(a,b)