#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long MOD = 12345678910;
const long double eps = 1e-13;
const int imax = INT_MAX;
int main() {
  cin.tie(0);
  ios_base ::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  if (k > n) {
    cout << "-1";
    return 0;
  }
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.rbegin(), a.rend());
  cout << a[k - 1] << " 0";
  return 0;
}
