#include <bits/stdc++.h>
std::mt19937_64 rng(
    std::chrono::steady_clock::now().time_since_epoch().count());
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k, a;
  vector<int> v;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  long long b = v[n - k];
  if (k > n) {
    cout << "-1";
  } else {
    cout << b << " "
         << "0";
  }
  return 0;
}
