#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K;
  while (cin >> N >> K) {
    long long a[N];
    for (int i = 0; i < (int)(N); ++i) cin >> a[i];
    sort(a, a + N);
    if (K > N)
      cout << -1 << endl;
    else
      cout << 0 << " " << a[N - K] << endl;
  }
}
