#include <iostream>
using namespace std;
int interpolationSearch(int arr[], int n, int x) {
int left = 0, right = n - 1;
while (left <= right && x >= arr[left] && x <= arr[right]) {
if (left == right) {
if (arr[left] == x) return left;
return -1;
}
int pos = left + ((x - arr[left]) * (right - left)) / (arr[right] - arr[left]);
if (arr[pos] == x) return pos;
if (arr[pos] < x) left = pos + 1;
else right = pos - 1;
}
return -1;
}
int main() {
int n,target;
cin >> n >> target;
int a[n];
for(int i = 0;i<n;i++){
cin >> a[i];
}
int result = interpolationSearch(a, n, target);
if(result==1) cout << "FOUND";
else cout << "NOT FOUND";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgaW50ZXJwb2xhdGlvblNlYXJjaChpbnQgYXJyW10sIGludCBuLCBpbnQgeCkgewogICAgaW50IGxlZnQgPSAwLCByaWdodCA9IG4gLSAxOwoKICAgIHdoaWxlIChsZWZ0IDw9IHJpZ2h0ICYmIHggPj0gYXJyW2xlZnRdICYmIHggPD0gYXJyW3JpZ2h0XSkgewogICAgICAgIGlmIChsZWZ0ID09IHJpZ2h0KSB7CiAgICAgICAgICAgIGlmIChhcnJbbGVmdF0gPT0geCkgcmV0dXJuIGxlZnQ7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9CgogICAgICAgIGludCBwb3MgPSBsZWZ0ICsgKCh4IC0gYXJyW2xlZnRdKSAqIChyaWdodCAtIGxlZnQpKSAvIChhcnJbcmlnaHRdIC0gYXJyW2xlZnRdKTsKCiAgICAgICAgaWYgKGFycltwb3NdID09IHgpIHJldHVybiBwb3M7CiAgICAgICAgaWYgKGFycltwb3NdIDwgeCkgbGVmdCA9IHBvcyArIDE7CiAgICAgICAgZWxzZSByaWdodCA9IHBvcyAtIDE7CiAgICB9CiAgICByZXR1cm4gLTE7Cn0KIAppbnQgbWFpbigpIHsKCWludCBuLHRhcmdldDsKCWNpbiA+PiBuID4+IHRhcmdldDsKCWludCBhW25dOwoJZm9yKGludCBpID0gMDtpPG47aSsrKXsKCQljaW4gPj4gYVtpXTsKCX0KICAgaW50IHJlc3VsdCA9IGludGVycG9sYXRpb25TZWFyY2goYSwgbiwgdGFyZ2V0KTsKICAgaWYocmVzdWx0PT0xKSBjb3V0IDw8ICJGT1VORCI7CiAgIGVsc2UgY291dCA8PCAiTk9UIEZPVU5EIjsKIAogICByZXR1cm4gMDsKfQ==