#include <bits/stdc++.h>
using namespace std;
const int N = 100;
int a[N];
int n, k;
int main() {
  cin >> n >> k;
  if (k > n) {
    cout << -1;
    exit(0);
  }
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  cout << 0 << " " << a[n - k];
}
