import strutils, sequtils let old, test = stdin.readLine.split('.').map parseInt for i, t in test: case t - old[i]: of 0: continue of 1 .. int.high: echo "NO" else: break quit() echo "YES"