import strutils, sequtils, algorithm let HN = readLine(stdin).split.map parseInt var arr = newSeqWith(0, 0) for i in 1 ..< HN[1]: arr.add readLine(stdin).parseInt arr.sort(cmp, Descending) for i in 0 .. arr.len: if i == arr.len or arr[i] < HN[0]: echo i + 1, ["st", "nd", "rd", "th"][min(3, i)] break