a)(я так понимаю a div 100 это а:100 только без остатка, а mod остаток от деления числа а на число b)
a=int(input())
e=False
b=a//100
c=(a//10)%10
d=a%10
if b==3 or c==3 or d==3 or b==6 or c==6 or d==6 or b==9 or c==9 or d==9:
e=True
If e:
print('YES')
else:
print('NO')
б)
a=int(input())
e=False
b=a//100
c=(a//10)%10
d=a%10
if b==4 or c==4 or d==4 or b==7 or c==7 or d==7:
e=True
If e:
print('YES')
else:
print('NO')