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