#include <bits/stdc++.h>
int arr[51];
int main() {
  memset(arr, 0, sizeof(arr));
  int n, k, i, j, t;
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  int flag = 1;
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (arr[i] < arr[j]) {
        t = arr[i];
        arr[i] = arr[j];
        arr[j] = t;
      }
    }
  }
  if (k > n) {
    printf("-1\n");
    return 0;
  } else {
    printf("%d 0\n", arr[k - 1]);
    return 0;
  }
}
