#include <bits/stdc++.h>
using namespace std;
template <typename T>
T sqr(const T &x) {
  return x * x;
}
const int INF = 1e9;
const long double EPS = 1e-9;
const long double PI = acos(-1.0);
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  vector<int> a(n);
  for (int i = 0; i < int(n); i++) scanf("%d", &a[i]);
  sort(a.begin(), a.end());
  int x = 0, y = 0;
  for (int i = 0; i < n; i++) {
    if (x != 0 && y != 0 && a[i] == x) puts("-1"), exit(0);
    if (n - i == k) {
      x = a[i];
      y = x;
    }
  }
  if (x != 0 && y != 0)
    printf("%d %d", x, y);
  else
    printf("-1");
  return 0;
}
