#include <bits/stdc++.h>
using namespace std;
int a[55];
bool cmp(int x, int y) { return x > y; }
int main() {
  int n, k;
  while (scanf("%d%d", &n, &k) != EOF) {
    for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
    sort(a + 1, a + n + 1, cmp);
    if (k > n)
      printf("-1\n");
    else {
      if (k == n)
        printf("%d 0\n", a[k]);
      else {
        if (a[k] == a[k + 1])
          printf("-1\n");
        else
          printf("%d 0\n", a[k]);
      }
    }
  }
  return 0;
}
