#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll INF = 1e18;
const int MOD = 1e9 + 7;
const int MX = 2e5 + 7;
const double PI = 3.1415926535897932384626;
template <class T>
void dbg(T val) {
  cout << val << '\n';
}
template <class T>
void dbgs(T val) {
  cout << val << " ";
}
void solve() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a, a + n);
  if (k > n) {
    dbg(-1);
    return;
  }
  int y = a[n - k];
  int x = y - 1;
  cout << x << " " << y;
}
void fastIO(string name = "") {
  cin.tie(0)->sync_with_stdio(0);
  if (int(name.size())) {
    freopen((name + ".in").c_str(), "r", stdin);
    freopen((name + ".out").c_str(), "w", stdout);
  }
}
int main() {
  fastIO("");
  int tc = 1;
  while (tc--) solve();
  return 0;
}
