#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (n < k) {
    cout << -1;
    return 0;
  }
  int a[n];
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  cout << a[n - k + 1] << " " << a[n - k + 1];
}
