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