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