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