#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m, k;
int x[50];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &x[i]);
  for (int i = 0; i < n; i++) {
    int k = 0;
    for (int j = 0; j < n; j++) k += int(x[j] >= x[i]);
    if (k == ::k) {
      printf("%d %d\n", x[i], x[i]);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
