#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
int r[] = {1, 0, -1, 0};
int c[] = {0, 1, 0, -1};
int Unset(int a, int i) {
  int mask;
  mask = 1 << i;
  a = a & ~mask;
  return a;
}
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
int power(int x, int n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0) {
    int y = power(x, n / 2);
    return y * y;
  } else
    return x * power(x, n - 1);
}
map<char, int> m1;
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  vector<int> v1;
  int temp;
  for (int A = 1; A <= n; A++) {
    cin >> temp;
    v1.push_back(temp);
  }
  sort(v1.begin(), v1.end());
  reverse(v1.begin(), v1.end());
  m--;
  if (m >= v1.size()) {
    cout << -1 << endl;
  } else {
    cout << v1[m] << " " << v1[m] << endl;
  }
  return 0;
}
