#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

typedef long double ld;
const ld PI = acosl(-1.0L);
const ld EPS = 1e-12L;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int T;
    cin >> T;

    while (T--) {
        int n, m;
        ld z;
        cin >> n >> m >> z;

        vector<ld> px(n), py(n);
        for (int i = 0; i < n; i++) {
            cin >> px[i] >> py[i];
        }

        ld half_z = z / 2.0L;

        vector<pair<ld, int>> events;

        for (int i = 0; i < n; i++) {
            ld x = px[i];
            ld y = py[i];
            ld r = sqrtl(x*x + y*y);
            ld alpha = atan2l(y, x);
            if (alpha < 0) alpha += 2*PI;

            ld ratio = half_z / r;

            ld lo, hi;
            if (ratio >= 1.0L) {
                lo = alpha - PI/2;
                hi = alpha + PI/2;
            } else {
                ld delta = asinl(ratio);
                lo = alpha - delta;
                hi = alpha + delta;
            }

            // Normalize lo to [0, 2*PI)
            while (lo < 0) lo += 2*PI;
            while (lo >= 2*PI) lo -= 2*PI;
            // Normalize hi to [0, 2*PI)
            while (hi < 0) hi += 2*PI;
            while (hi >= 2*PI) hi -= 2*PI;

            if (lo <= hi) {
                events.push_back({lo, 1});
                events.push_back({hi, -1});
            } else {
                // Interval wraps around 0
                events.push_back({0.0L, 1});
                events.push_back({hi, -1});
                events.push_back({lo, 1});
                events.push_back({2*PI, -1});
            }
        }

        sort(events.begin(), events.end(), [](const pair<ld,int>& a, const pair<ld,int>& b) {
            if (fabsl(a.first - b.first) < EPS) return a.second > b.second;
            return a.first < b.first;
        });

        int max_count = 0, count = 0;
        for (const auto& ev : events) {
            count += ev.second;
            max_count = max(max_count, count);
        }

        cout << (max_count >= m ? "Yes" : "No") << "\n";
    }

    return 0;
}
