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