#include <bits/stdc++.h>
using namespace std;
int s[100000];
int main() {
  int t, tar;
  cin >> t >> tar;
  for (int i = 0; i < t; i++) cin >> s[i];
  sort(s, s + t, greater<int>());
  cout << endl;
  if (tar > t)
    cout << "-1";
  else
    cout << s[tar - 1] << " " << s[tar - 1];
}
