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