Each of you probably has your personal experience of riding public transportation and buying tickets. After a person buys a ticket (which traditionally has an even number of digits), he usually checks whether the ticket is lucky. Let us remind you that a ticket is lucky if the sum of digits in its first half matches the sum of digits in its second half.

But of course, not every ticket can be lucky. Far from it! Moreover, sometimes one look at a ticket can be enough to say right away that the ticket is not lucky. So, let's consider the following unluckiness criterion that can definitely determine an unlucky ticket. We'll say that a ticket is definitely unlucky if each digit from the first half corresponds to some digit from the second half so that each digit from the first half is strictly less than the corresponding digit from the second one or each digit from the first half is strictly more than the corresponding digit from the second one. Each digit should be used exactly once in the comparisons. In other words, there is such bijective correspondence between the digits of the first and the second half of the ticket, that either each digit of the first half turns out strictly less than the corresponding digit of the second half or each digit of the first half turns out strictly more than the corresponding digit from the second half.

For example, ticket 2421 meets the following unluckiness criterion and will not be considered lucky (the sought correspondence is 2 &gt; 1 and 4 &gt; 2), ticket 0135 also meets the criterion (the sought correspondence is 0 &lt; 3 and 1 &lt; 5), and ticket 3754 does not meet the criterion. 

You have a ticket in your hands, it contains 2*n* digits. Your task is to check whether it meets the unluckiness criterion.
The first line contains an integer *n* (1 ≤ *n* ≤ 100). The second line contains a string that consists of 2*n* digits and defines your ticket.
2
2421
YES
2
0135
YES
2
3754
NO
1
33
NO
2
3444
NO
3
221323
YES
3
132432
YES
1
10
YES
3
999000
YES
5
2563434512
YES
10
01101001000011011110
NO
10
10001222212022211120
NO
10
36828132853144011224
YES
20
1011022122111202122200100211021100001122
NO
20
5232324254212415411311123313002001301121
YES
20
7405800505032736115894335199688161431589
YES
20
3415010010430312351463661555326552265642
YES
50
2102200200102000012010102011211201121112001112220022023331220132002222113003003302101312001033110321
NO
50
5612454122355331521225634515354651153334442245234623042403102434401340330012200102111030242232001423
YES
50
0013011201111112210231333121030031021132323232322331422253215312454431312252454531121325154332452522
YES
50
1333113332002310001130333200002120101112101000001001122200021012010112000102121102212021200102011000
NO
50
7768982292275759939882751465173844816331588199736866065335518782157581162167237401803021840688341656
YES
50
5060172568971658079607579942843871533766899530593457744544240062187820782803777264583028807003285606
NO
100
32033233210213232101210131232021120310331112120033001231123232221200213021203033300033131302232100038528951495743459997297531816949698487426212357538284284222536535855445278621151486932989238531899512
YES
100
02002102210011010100120120200220102011120101221112212222120020210120100100210020110121012200202122003345665163205330111020604514053164225655212253500113103534213313020162345540026653211623642123220355
NO
100
77183123282838517843664381789267288922656323541699343586762218319159218294863295482798464649254394971213132422224212223202404302223411433322333414121022024111412343110143421202444434024400100413442214
YES
100
10001111012200211011000121001200011210000020102102001022212010122102202221201112010122020001101100108897949728635541168542364573471936555772537461654157812311614931827469976934765219573155999659346292
YES
100
01232301021031212111013002303211223032012113201031332103213332222202203330122103103121131233013000116022330435355138573123144360458655075068170808157467335580232261005471574645456707410743351868832288
NO
100
29984263744168545119858476736999712929651758223788987449661283528958984743292587725324189134223179864351053241163312352223630541424435625146656004416300322106250255412140420461130552626644306153634053
YES
100
31600324621210624556500610052054505630313425345404534213653266122646254136660603332516425411106060211654812165791554127683771773326741719787895359171717963263779732526239927838412657412425615852874991
YES
1
09
YES
10
11111111112222222222
YES
100
88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
YES
100
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
NO
100
88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
YES
2
2231
NO
100
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
YES
100
10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
NO
3
123022
NO
2
2322
NO
6
123456789000
NO
10
22222222224444444444
YES
100
24242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424
NO
5
1257823589
NO
3
158159
NO
100
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
NO
100
99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999991111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
YES
100
22343424233121404112342221440103014430444234223303320243202210332120013031314432132430043330110313112023440313043212221301033103041340034304442240323002140112031424013224122404204110340334110122004100
NO
3
378954
NO
100
22222222222222222222222222222222222222222222222222111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333
YES
3
123012
YES
100
43242352435435435423653231443242342313412343253241432423524354354354236532314432423423134123432532417897987897897979897879879878979787987987987987989978979878978979798978798798789797879879879879879899
YES
3
000100
NO
2
0001
NO
3
111117
NO

n = int(input())

arr = input()
arr1 = list(map(int, arr))
sub1 = arr1[:len(arr)//2]
sub2 = arr1[len(arr)//2:]

sub1.sort()
sub2.sort()

print(sub1, sub2)
cr1 = True
cr2 = True
for i in range(n):
    if sub1[i] >= sub2[i]:
        cr1 = False
    if sub1[i] <= sub2[i]:
        cr2 = False


print("Yes") if cr1 or cr2 else print("No")

 		 	 		 									    	 		 		