The problem is from codeforces: http://codeforces.com/contest/263/problem/B

#!/usr/bin/env python
n, k = map(int, raw_input().split())
a = map(int, raw_input().split())
if k > n:
print -1
else:
a.sort()
print a[n - k], 0
–EOF (The Ultimate Computing & Technology Blog) —
Last Post: Codeforces: A. Beautiful Matrix
Next Post: Solve the Knight Tour in Python (Breadth First Search Algorithm)