#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, temp;
  cin >> n >> k;
  vector<int> v;
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    v.push_back(temp);
  }
  sort(v.rbegin(), v.rend());
  int ans = v[k - 1];
  if (k > n) {
    cout << "-1" << endl;
  } else {
    cout << ans << " " << ans - 1;
  }
}
