#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, x;
  while (scanf("%d%d", &n, &k) == 2) {
    map<int, int> ct;
    map<int, int>::iterator it;
    for (int i = 0; i < (n); i++) {
      scanf(" %d", &x);
      ct[-x]++;
    }
    int acc = 0;
    bool deu = false;
    for (it = ct.begin(); it != ct.end(); it++) {
      acc += it->second;
      if (acc == k) {
        deu = true;
        printf("%d %d\n", -it->first, -it->first);
        break;
      }
    }
    if (!deu) printf("-1\n");
  }
  return 0;
}
