#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, j, ans = 0, a, k = 0, d, cnt = 0, b, mx = 0;
  string s, ss, str;
  cin >> n >> k;
  long long int ara[n + 1], taj[n + 1];
  map<long long int, long long int> mp;
  for (i = 1; i <= n; i++) {
    cin >> ara[i];
    mx = max(a, mx);
  }
  sort(ara + 1, ara + n + 1, greater<long long int>());
  if (n < k)
    cout << -1 << endl;
  else
    cout << ara[k] << " " << 0 << endl;
  return 0;
}
