import std.stdio; import std.string; import std.conv; import std.algorithm; import std.range; import std.array; /// isOld =============== bool isOld(int[] old, int[] target){ if(old.length == 0) return true; if(target[0] <= old[0]) return isOld(old[1..$], target[1..$]); return false; } /// main ============= void main(){ auto old = readln.strip.split(".").map!(to!int).array; auto target = readln.strip.split(".").map!(to!int).array; writeln( isOld(old, target) ? "YES" : "NO" ); }