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