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