#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, i;
  cin >> n >> m;
  long long ar[n];
  for (i = 0; i < n; i++) cin >> ar[i];
  sort(ar, ar + n);
  if (m == n)
    cout << ar[0] << " " << ar[0] << endl;
  else if (m > n)
    cout << -1 << endl;
  else {
    i = ar[n - m - 1];
    cout << i + 1 << " " << i + 1 << endl;
  }
  return 0;
}
