diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -2,7 +2,7 @@
     N = int(input())
     S = input()
     for i in range(1, N):
-        if S[0] < S[i]:
+        if S[0:i] < S[i:]:
             print("Yes")
             return
     print("No")
