#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <iostream>
#include <fstream>
#include <cmath>
#include <random>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <functional>
#include <typeinfo>

#include <vector>
#include <array>
#include <valarray>
#include <queue>
#include <stack>
#include <set>
#include <map>

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cassert>

using namespace std;

namespace io{

    template<typename First, typename Second> ostream& operator << ( ostream &os, const pair<First, Second> &p ) { return os << p.first << " " << p.second; }
    template<typename First, typename Second> ostream& operator << ( ostream &os, const map<First, Second> &mp ) { for( auto it : mp ) { os << it << endl;  } return os; }
    template<typename First> ostream& operator << ( ostream &os, const vector<First> &v ) { bool space = false; for( First x : v ) { if( space ) os << " "; space = true; os << x; } return os; }
    template<typename First> ostream& operator << ( ostream &os, const set<First> &st ) { bool space = false; for( First x : st ) { if( space ) os << " "; space = true; os << x; } return os; }
    template<typename First> ostream& operator << ( ostream &os, const multiset<First> &st ) { bool space = false; for( First x : st ) { if( space ) os << " "; space = true; os << x; } return os; }

    template<typename First, typename Second> istream& operator >> ( istream &is, pair<First, Second> &p ) { return is >> p.first >> p.second; }
    template<typename First> istream& operator >> ( istream &is, vector<First> &v ) { for( First &x : v ) { is >> x; } return is; }

    long long fastread(){ char c; long long d = 1, x = 0; do c = getchar(); while( c == ' ' || c == '\n' ); if( c == '-' ) c = getchar(), d = -1; while( isdigit( c ) ){ x = x * 10 + c - '0'; c = getchar(); } return d * x; }

    static bool sep = false;

    using std::to_string;

    string to_string( bool x ){ return ( x ? "true" : "false" ); }
    string to_string( const string & s ){ return "\"" + s + "\""; }
    string to_string( const char * s ){ return "\"" + string( s ) + "\""; }
    string to_string ( const char & c ) { string s; s += c; return "\'" + s + "\'"; }

    template<typename Type> string to_string( vector<Type> );
    template<typename Type> string to_string( vector<Type> v ) { bool sep = false; string s = "["; for( Type x: v ){ if( sep ) s += ", "; sep = true; s += to_string( x ); } s += "]"; return s; }
    template<typename Collection> string to_string( Collection );
    template<typename Collection> string to_string( Collection collection ) { bool sep = false; string s = "{"; for( auto x: collection ){ if( sep ) s += ", "; sep = true; s += to_string( x ); } s += "}"; return s; }
    template<typename First, typename Second> string to_string( pair<First, Second> p ){ return "{" + to_string( p.first ) + ", " + to_string( p.second ) + "}"; }

    void print() { cerr << endl; sep = false; }
    template <typename First, typename... Other> void print( First first, Other... other ) { if( sep ) cerr << " | "; sep = true; cerr << to_string( first ); print( other... ); }

} using namespace io;

namespace utils {

    class Range {
        private:
            const int start;
            const int stop;
            const int step;

        public:
            class iterator {
            private:
                int value;
                const int step;
                const int boundary;
                const bool sign;

            public:
                typedef std::forward_iterator_tag iterator_category;
                typedef int &reference;
                typedef int *pointer;

                iterator( int value, int step, int boundary ) : value( value ), step( step ), boundary( boundary ), sign( step > 0 ) {}
                iterator operator ++ () { value += step; return *this; }
                reference operator * () { return value; }
                const pointer operator -> () { return &value; }
                bool operator == ( const iterator& rhs ) { return sign ? ( value >= rhs.value && value > boundary ) : (value <= rhs.value && value < boundary ); }
                bool operator != ( const iterator& rhs ) { return sign ? ( value < rhs.value && value >= boundary ) : ( value > rhs.value && value <= boundary ); }
            };

            Range( const int &start, const int &stop, const int &step ) : start( start ), stop( stop ), step( step ) {}
            iterator begin() const { return iterator( start, step, start ); }
            iterator end() const { return iterator( stop, step, start ); }
    };

    Range range( const int &stop ) { return Range( 0, stop, 1 ); }
    Range range( const int &start, const int &stop ) { return Range( start, stop, 1 ); }
    Range range( const int &start, const int &stop, const int &step ) { return Range( start, stop, step ); }

    template<typename T> inline T max( T t ) { return t; }
    template<typename First, typename ...Others> inline auto max( First first, Others ...others ) { auto result = max( others... ); return result > first ? result : first; }

    template<typename T> inline T min( T t ) { return t; }
    template<typename First, typename ...Others> inline auto min( First first, Others ...others ) { auto result = min( others... ); return result < first ? result : first; }

    template<typename T1, typename T2> inline void updmax ( T1 &a, T2 b ) { a = a > b ? a : b; }
    template<typename T1, typename T2> inline void updmin ( T1 &a, T2 b ) { a = a < b ? a : b; }

    template<typename T1, typename T2> inline bool chkmax ( T1 &a, T2 b ) { if( a < b ) { a = b; return true; } return false; }
    template<typename T1, typename T2> inline bool chkmin ( T1 &a, T2 b ) { if( a > b ) { a = b; return true; } return false; }

    constexpr long long operator"" _E ( unsigned long long n ){ long long p = 1, a = 10; for( int i = 0; i < n; i++ ) p *= a; return p; }
    long double operator"" _deg ( long double deg ){ long double PI = acos( -1 ); return deg * PI / 180; }

    random_device rd; mt19937 mt( rd( ) );
    template<typename T> T rand ( T l, T r ) { uniform_int_distribution<T> dist( l, r ); return dist( mt ); };

    namespace Color {
        string
        HEADER = "\033[95m",
        OKBLUE = "\033[94m",
        OKGREEN = "\033[92m",
        WARNING = "\033[93m",
        FAIL = "\033[91m",
        ENDC = "\033[0m",
        BOLD = "\033[1m",
        UNDERLINE = "\033[4m",
        BGGREEN = "\x1b[6;30;42m";
    }

    struct dtime {
        int h, m, s;

        dtime( int h, int m, int s ) : h( h ), m( m ), s( s ) {}

        dtime() {
            h = ( ( time( 0 ) / 60 / 60 ) % 24 + 5 ) % 24;
            m  = ( time( 0 ) / 60 ) % 60;
            s = time( 0 ) % 60;
        }

        friend bool operator < ( const dtime &t1, const dtime &t2 ){
            if( t1.h == t2.h ){
                if( t1.m == t2.m ){
                    return t1.s < t2.s;
                }
                return t1.m < t2.m;
            }
            return t1.h < t2.h;
        }

        friend ostream& operator << ( ostream &os, const dtime &t ){
            os << t.h << " " << t.m << " " << t.s << endl;
            return os;
        }

        friend string to_string( const dtime &t ){
            return to_string( t.h ) + ":" + to_string( t.m ) + ":" + to_string( t.s );
        }
    };

    dtime get_current_time() {
        return dtime();
    }

} using namespace utils;

template<typename T> class nparray {

private:
    T * _data = nullptr, * _max = nullptr, * _min = nullptr, * _sum = nullptr;
    size_t _size;

public:
    nparray(){}
    nparray( size_t size ) { __init( size ); }

    void __init( size_t size ){ _size = size; _data = new T[size]; fill( 0 ); }

    T sum() { return std::accumulate( _data, _data + _size, 0 ); }
    T sum( size_t stop ) { return sum( 0, stop ); }
    T sum( size_t start, size_t stop ){ if( _sum == nullptr ) __sumrecalc(); T sum_ = _sum[stop]; if( start ) sum_ -= _sum[start - 1]; return sum_; }
    T sum( size_t start, size_t stop, size_t step ) { T sum_ = 0; for( size_t i = start; i < stop; i += step ) { sum_ += _data[i]; } return sum_; }

    T max(){ return std::max_element( _data, _data + this -> _size ); }
    T max( size_t index ){ assert( index < _size ); if( _max == nullptr ) __maxrecalc(); return _max[index]; }

    T min(){ return std::min_element( _data, _data + _size ); }
    T min( size_t index ){ assert( index < _size ); if( _min == nullptr ) __minrecalc(); return _min[index]; }

    T* begin() { return _data; }
    T* end() { return _data + _size; }

    T* cbegin() { return _data + _size - 1; }
    T* cend() { return _data - 1; }

    void fill( int value ){ std::fill( _data, _data + _size, value ); }
    void reverse( ){ std::reverse( _data, _data + _size ); if( _sum != nullptr ) std::reverse( _sum, _sum + _size ); if( _max != nullptr ) std::reverse( _max, _max + _size ); if( _min != nullptr ) std::reverse( _min, _min + _size ); }
    void sort( ){ std::sort( _data, _data + _size ); if( _sum != nullptr ) __sumrecalc(); if( _max != nullptr ) __maxrecalc(); if( _min != nullptr ) __minrecalc(); }
    void shift( int count ) { count %= ( int32_t )_size; T *temp = new T[_size]; int j = ( count < 0 ? _size + count: count ); for( size_t i = 0; i < _size; i++, j++ ){ if( j == _size ) j = 0; temp[j] = _data[i]; } for( size_t i = 0; i < _size; i++ ){ _data[i] = temp[i]; } delete temp; }
    void random_shuffle( ){ std::random_shuffle( _data, _data + _size );  }
    bool is_sorted( ){ for( int i = 1; i < _size; i++ ){ if( _data[i - 1] > _data[i + 1] ){ return false; } } return true; }
    void resize( size_t size ) { __clear(); __init( size ); }

    void __clear() { _size = 0; delete _data; delete _max; delete _min; delete _sum; }
    void __sumrecalc(){ _sum = new T[_size]; _sum[0] = _data[0]; for( int i = 1; i < _size; i++ ){ _sum[i] = _sum[i - 1] + _data[i]; } }
    void __maxrecalc(){ _max = new T[_size]; _max[0] = _data[0]; for( int i = 1; i < _size; i++ ){ _max[i] = ( _data[i] > _max[i - 1] ? _data[i] : _max[i - 1]); } }
    void __minrecalc(){ _min = new T[_size]; _min[0] = _data[0]; for( int i = 1; i < _size; i++ ){ _min[i] = ( _data[i] < _min[i - 1] ? _data[i] : _min[i - 1]); } }

    T& operator [] ( int index ){ if( index < 0 ){ assert( -index <= _size ); return _data[_size + index]; } else { assert( index < _size ); return _data[index]; } }
    size_t size() { return _size; }
    bool empty(){ return ( _size == 0 ); }

    friend ostream& operator << ( ostream &os, nparray<T> &array ) { for( size_t i = 0; i < array.size(); i++ ) { if( i ) os << " "; os << array[i]; } return os; }
    friend istream& operator >> ( istream &is, nparray<T> &array ) { for( size_t i = 0; i < array.size(); i++ ) { is >> array[i]; } return is; }

    friend string to_string( nparray<T> &array ){ string s = "{ "; for( size_t i = 0; i < array.size(); i++ ) { if( i ) s += ", "; s += to_string( array[i] ); } s += "}"; return s; }
    ~nparray() { __clear(); }

};

/*
    main
*/

#define int long long

#ifdef LOCAL_JUDGE
#define print( ... ) cerr << "[" << #__VA_ARGS__ << "]: "; io::print( __VA_ARGS__ );
#else
#define print( ... )
#endif

const int MOD = 1'000'000'007; // 998'244'353
const double EPS = 1e-9;
const double PI = acos( -1. );
long long LLINF = 18_E + 10;
int INF = 9_E + 10;

const int MAXN = 6_E + 6;
const int N = 5_E + 5;

int C( int n, int k ){
    if( k > n ) return 0;
    if( k == 1 ) return n;
    if( k == 2 ) return n * ( n - 1 ) / 2;
    if( k == 3 ) return n * ( n - 1 ) * ( n - 2 ) / 6;
    return 0;
}

int cnt[4][211111];
int a[4][1111];

void solution( istream &cin, ostream &cout, const int &test_case )
{
    int g, d, c;
    cin >> g >> d >> c;
    vector<int> v;
    for( int i = 1; i <= g; i++ ){
        cin >> a[1][i];
        v.push_back( a[1][i] );
        cnt[1][a[1][i]]++;
    }
    for( int i = 1; i <= d; i++ ){
        cin >> a[2][i];
        v.push_back( a[2][i] );
        cnt[2][a[2][i]]++;
    }
    for( int i = 1; i <= c; i++ ){
        cin >> a[3][i];
        v.push_back( a[3][i] );
        cnt[3][a[3][i]]++;
    }
    for( int i = 1; i <= 3; i++ ){
        for( int j = 1; j < 200001; j++ ){
            cnt[i][j] += cnt[i][j - 1];
        }
    }
    int ans = 0;
    for( int i = 1; i <= g; i++ ){
        int x = a[1][i];
        int cnt_1 = cnt[1][x + x] - cnt[1][x - 1];
        int cnt_2 = cnt[2][x + x] - cnt[2][x - 1];
        int cnt_3 = cnt[3][x + x] - cnt[3][x - 1];
        ans += C( cnt_2, 2 ) * C( cnt_3, 3 );
    }
    for( int i = 1; i <= d; i++ ){
        int x = a[2][i];
        int cnt_1 = cnt[1][x + x] - cnt[1][x - 1];
        int cnt_2 = cnt[2][x + x] - cnt[2][x - 1];
        int cnt_3 = cnt[3][x + x] - cnt[3][x - 1];
        ans += C( cnt_1, 1 ) * C( cnt_2 - 1, 1 ) * C( cnt_3, 3 );
    }
    for( int i = 1; i <= c; i++ ){
        int x = a[3][i];
        int cnt_1 = cnt[1][x + x] - cnt[1][x - 1];
        int cnt_2 = cnt[2][x + x] - cnt[2][x - 1];
        int cnt_3 = cnt[3][x + x] - cnt[3][x - 1];
        ans += C( cnt_1, 1 ) * C( cnt_2, 2 ) * C( cnt_3 - 1, 2 );
    }
    cout << ans << endl;
}

int32_t main()
{

    srand( time( 0 ) );

    ios_base::sync_with_stdio( false ); cin.tie( nullptr ); cout.tie( nullptr );

    std::istream& in( std::cin );
    std::ostream& out( std::cout );

    int32_t queries = 1;
    //cin >> queries;

    for( int32_t test_case: range( 1, queries + 1 ) ){
        solution( cin, cout, test_case );
    }

    return EXIT_SUCCESS;

}


#include <iostream>
#include <vector>
#include <deque>
#include <map>
#include <set>
#include <algorithm>
using namespace std;

#include <cmath>

long long C(int n, int k){
    if (n < k)
        return 0;
    if (k == 1)
        return n;
    if (k == 2)
        return n * (n - 1) / 2;
    if (k == 3)
        return n * (n - 1) * (n - 2) / 6;
}

int main() {
    int n, m, k;
    cin >> n >> m >> k;
    vector<pair<int, int>> v;
    int x;
    for (int i = 0; i < n; i++){
        cin >> x;
        v.push_back({x, 1});
    }
    for (int i = 0; i < m; i++){
        cin >> x;
        v.push_back({x, 2});
    }
    for (int i = 0; i < k; i++){
        cin >> x;
        v.push_back({x, 3});
    }
    sort(v.begin(), v.end());
    int i = 0;
    int j = 0;
    int cntOne = 0, cntSecond = 0, cntThird = 0;
    /*for (pair<int, int> i : v)
        cout << i.first << ":" << i.second << " ";
    cout << endl;*/
    long long int answer = 0;
    while (true){
        while (v[i].first * 2 >= v[j].first && j < n + m + k){
            //cout << i << " " << j << " " << cntOne << " " << cntSecond << " " << cntThird << " " << answer << endl;
            if (v[j].second == 1) {
                cntOne++;
                answer += C(cntSecond, 2) * C(cntThird, 3);
            }
            if (v[j].second == 2) {
                cntSecond++;
                answer += C(cntOne, 1) * (cntSecond - 1) * C(cntThird, 3);
            }
            if (v[j].second == 3) {
                cntThird++;
                answer += C(cntOne, 1) * C(cntSecond, 2) * ((cntThird - 1) * (cntThird - 2) / 2);
            }
            j++;
        }
        if (v[i].second == 1)
            cntOne--;
        if (v[i].second == 2)
            cntSecond--;
        if (v[i].second == 3)
            cntThird--;
        i++;
        if (i == n + m + k)
            break;
    }
    cout << answer;
}


#include <iostream>
#include <tuple>
#include <vector>
#include <algorithm>
#include <iterator>
using namespace std;

enum class player { goaltender, defenceman, forwarder };

int64_t fac(const int n) {
    int64_t accum = 1;
    for (int i = 2; i <= n; ++i) accum *= i;
    return accum;
}

// int64_t combinations(const int n, const int k) {
//     return fac(n) / fac(n - k);
// }
int64_t combinations(const int n, const int k) {
    if (k > n || k < 0) return 0;
    int64_t accum = 1;
    for (int i = n; i > n - k; --i) { accum *= i; };
    return accum / fac(k);
}

int main() {
    int g, d, f; cin >> g >> d >> f;

    vector<pair<int, player>> numbers;
    numbers.reserve(g + d + f);
    for (const auto [count, type] : {
        tuple(g, player::goaltender),
        tuple(d, player::defenceman),
        tuple(f, player::forwarder)
    }) for (int i = 0; i < count; ++i) {
        int number; cin >> number;
        numbers.push_back({number, type});
    }

    sort(begin(numbers), end(numbers));
    int64_t summary = 0;
    for (auto min_it = begin(numbers); min_it != end(numbers); ++min_it) {
        auto max_it = upper_bound(min_it, end(numbers), min_it->first * 2, [](int x, const auto& a) { return x < a.first; });

        int gt_count = 0, dm_count = 0, fw_count = 0;
        for (auto it = min_it + 1; it != max_it; ++it) {
            switch (it->second) {
                case player::goaltender: gt_count++; break;
                case player::defenceman: dm_count++; break;
                case player::forwarder: fw_count++; break;
            }
        }

        summary += (combinations(gt_count, 1 - (min_it->second == player::goaltender)))
                 * (combinations(dm_count, 2 - (min_it->second == player::defenceman)))
                 * (combinations(fw_count, 3 - (min_it->second == player::forwarder)));
    }

    cout << summary;
    return 0;
}


#include <iostream>
#include <tuple>
#include <vector>
#include <algorithm>
#include <iterator>
using namespace std;

enum class player { goaltender, defenceman, forwarder };

int64_t fac(const int n) {
    int64_t accum = 1;
    for (int i = 2; i <= n; ++i) accum *= i;
    return accum;
}

// int64_t combinations(const int n, const int k) {
//     return fac(n) / fac(n - k);
// }
int64_t combinations(const int n, const int k) {
    if (k > n || k <= 0) return 0;
    int64_t accum = 1;
    for (int i = n; i > n - k; --i) { accum *= i; };
    return accum / fac(k);
}

int main() {
    int g, d, f; cin >> g >> d >> f;

    vector<pair<int, player>> numbers;
    numbers.reserve(g + d + f);
    for (const auto [count, type] : {
        tuple(g, player::goaltender),
        tuple(d, player::defenceman),
        tuple(f, player::forwarder)
    }) for (int i = 0; i < count; ++i) {
        int number; cin >> number;
        numbers.push_back({number, type});
    }

    sort(begin(numbers), end(numbers));
    int64_t summary = 0;
    for (auto min_it = begin(numbers); min_it != end(numbers); ++min_it) {
        auto max_it = upper_bound(min_it, end(numbers), min_it->first * 2, [](int x, const auto& a) { return x < a.first; });

        int gt_count = 0, dm_count = 0, fw_count = 0;
        for (auto it = min_it; it != max_it; ++it) {
            switch (it->second) {
                case player::goaltender: gt_count++; break;
                case player::defenceman: dm_count++; break;
                case player::forwarder: fw_count++; break;
            }
        }
        summary += gt_count * combinations(dm_count, 2) * combinations(fw_count, 3);
    }

    cout << summary;
    return 0;
}


from sys import stdin
import math

n = int(stdin.readline().rstrip())

for _ in range(n):
    a,b,n,S = map(int, stdin.readline().rstrip().split(' '))

    if b >= S:
        print('YES')
    elif S <= a*n+b and a*n <= S:
        print('YES')
    else:
        l = 0; r = math.ceil(math.log(S, n))
        while l <= r:
            m = (l + r) // 2 #
            cur = n*m
            next = n*(m+1)

            if cur <= S and next >= S:
                if cur + b >= S:
                    print('YES')
                else:
                    print('NO')
                break
            elif cur < S:
                l = m + 1
            else:
                r = m - 1
        if l > r:
            print('NO')


import sys

q = int(sys.stdin.readline())

for _ in range(q):
    a, b, n, S = map(int, sys.stdin.readline().split())

    if S / n == int(S/n):
        temp = int((S/n)) - 1
    else:
        temp = int(S/n)
    if temp < a:
        print("NO")
    else:
        result = S - temp*n
        if b < result:
            print("NO")
        else:
            print("YES")


import sys

q = int(sys.stdin.readline())

for _ in range(q):
    a, b, n, S = map(int, sys.stdin.readline().split())

    if S / n == int(S/n):
        temp = int((S/n)) - 1
    else:
        temp = int(S/n)
    if temp > a:
        print("NO")
    else:
        result = S - temp*n
        if b < result:
            print("NO")
        else:
            print("YES")


import sys

q = int(sys.stdin.readline())

for _ in range(q):
    a, b, n, S = map(int, sys.stdin.readline().split())

    if S / n == int(S/n):
        temp = int((S/n)) - 1
    else:
        temp = int(S/n)
    if temp > a:
        # print("call1")
        print("NO")
    elif temp == 0:
        # print("call4")
        print("NO")
    else:
        result = S - temp*n
        if b < result:
            # print("call2")
            print("NO")
        else:
            # print("call3")
            print("YES")


import sys

q = int(sys.stdin.readline())

for _ in range(q):
    a, b, n, S = map(int, sys.stdin.readline().split())

    if S % n == 0:

        if a >= S // n:

            print("YES")
        else:
            if b >= S - a*n:

                print("YES")
            else:

                print("NO")

    else:

        if a > S // n:

            print(S//n)
            result = S - n*(S//n)
            if result <= b:

                print("YES")
            else:

                print("NO")

        else:
            result = S - a*n
            if result <= b:

                print("YES")
            else:

                print("NO")


import sys

q = int(sys.stdin.readline())

for _ in range(q):
    a, b, n, S = map(int, sys.stdin.readline().split())

    if S % n == 0:

        if a >= S // n:

            print("YES")
        else:
            if b >= S - a*n:

                print("YES")
            else:

                print("NO")

    else:

        if a > S // n:

            result = S - n*(S//n)
            if result <= b:

                print("YES")
            else:

                print("NO")

        else:
            result = S - a*n
            if result <= b:

                print("YES")
            else:

                print("NO")


import sys

q = int(sys.stdin.readline())

for _ in range(q):
    a, b, n, S = map(int, sys.stdin.readline().split())

    if S % n == 0:
        if a >= S // n:
            print("YES")
        else:
            if b >= S - a*n:
                print("YES")
            else:
                print("NO")

    else:
        if a > S // n:
            result = S - n*(S//n - 1)
            if result <= b:
                print("YES")
            else:
                print("NO")
        else:
            result = S - a*n
            if result <= b:
                print("YES")
            else:
                print("NO")


t=int(input())
for _ in range(t):
	a,b,n,s=map(int,input().split())
	q=s//n
	r=s%n
	if q-a<=(b-r)//n and q-a>=0:
		print("YES")
	else:print("NO")


t=int(input())
for _ in range(t):
	a,b,n,s=map(int,input().split())
	q=s//n
	r=s%n
	if q<=a and r<=b:
		print("YES")
	else:print("NO")


t=int(input())
for _ in range(t):
	a,b,n,s=map(int,input().split())
	q=s//n
	r=s%n
	if q<=a:
		if r<=b:
			print("YES")
		else:print("NO")
	else:
		if r+(q-a)*n<=b:
			print("YES")
		else:print("NO")


import math
for i in range(int(input())):
    a,b,c,d=map(int,input().split())
    print(['NO','YES'][d//c>=a>=math.ceil((d-b)/c)])


for i in range(int(input())):
    a,b,c,d=map(int,input().split())
    print(['NO','YES'][(d-b)/c<=a<=d/c])


import math
for i in range(int(input())):
    a,b,c,d=map(int,input().split())
    print(['NO','YES'][(d-1)//c>=a>=math.ceil((d-b)/c)])


import math
for i in range(int(input())):
    a,b,n,s=map(int,input().split())
    print(['NO','YES'][min(a,s//n)-max(0,math.ceil((s-b)/n))+1>0])


import sys
input = sys.stdin.buffer.readline
a = int(input())
for _ in range(a):
    b,c,d,e = map(int,input().split())
    h = 0
    sol = 0
    for x in range(b):
        h += d
        if h == e:
            sol = e
            break
        elif h > e:
            sol = h-d
            break
        else:
            sol = h
    if sol == e:
        print("yes")
    elif sol+c >= e:
        print("yes")
    else:
        print("no")


import sys
input = sys.stdin.buffer.readline
a = int(input())
for _ in range(a):
    b,c,d,e = map(int,input().split())
    if c >= e:
        print("yes")
    else:
        p = e//d
        if p > b:
            if ((b*d)+c) >= e:
                print("yes")
            else:
                print("no")
        else:
            if ((p*d)+c) >= e:
                print("yes")
            else:
                print("no")


import sys
input = sys.stdin.buffer.readline
a = int(input())
for _ in range(a):
    b,c,d,e = map(int,input().split())
    h = 0
    sol = 0
    for x in range(b):
        h += d
        if h == e:
            sol = e
            break
        elif h > e:
            sol = h-d
    if sol == e:
        print("yes")
    elif sol+c >= e:
        print("yes")
    else:
        print("no")


from collections import *
import sys

# "". join(strings)

def ri():
    return int(input())

def rl():
    return list(map(int, input().split()))

t=ri()

for _ in range(t):
	ans='NO'
	a,b,n,S = rl()
	for x in range(a+1):
		for y in range(b+1):
			if x*n+y==S:
				ans="YES"
				break
		if ans=='YES':
			break

	print(ans)


from collections import *
import sys

# "". join(strings)

def ri():
    return int(input())

def rl():
    return list(map(int, input().split()))

t=ri()

for _ in range(t):
	ans='NO'
	a,b,n,S = rl()
	x=int(S/n)
	while (x>=(S-b)/n) and x>=0:
		if x<=a:
			ans="YES"
			break
		x-=1
	print(ans)


from collections import *
import sys

# "". join(strings)

def ri():
    return int(input())

def rl():
    return list(map(int, input().split()))

t=ri()

for _ in range(t):
	ans='NO'
	a,b,n,S = rl()

	if S<=b:
		ans="YES"
	else:
		q=int(S/n)
		if q>=(S-b)/n and a>=(S-b)/n:
			ans="YES"
	print(ans)


q=int(input())
for j in range(q):
    a,b,n,s=map(int,input().split())
    if(b<n):
        if(s%n<=b):
            m=(s-(s%n))//n
            if(m>=0 and m<=a):
                print("YES")
            else:
                print("NO")
        else:
            print("NO")
    else:
        k=0
        m=s%n
        while(m<=b):
            k+=1
            m=k*n +(s%n)
        m-=n
        p=(s-m)//n
        if(p>=0 and p<=a):
            print("YES")
        else:
            print("NO")


q=int(input())
for j in range(q):
    a,b,n,s=map(int,input().split())
    if(b<n):
        if(s%n<=b):
            m=(s-(s%n))//n
            if(m>=0 and m<=a):
                print("YES")
            else:
                print("NO")
        else:
            print("NO")
    else:
        if(b>=s):
          m=s
        else:
            if((s%n)<=(b%n)):
                m=b-(b%n)+(s%n)
            else:
                m=b-(b%n)+(s%n)-n
        p=(s-m)//n
        if(p>=0 and p<=a):
            print("YES")
        else:
            print("NO")


q=int(input())
for j in range(q):
    a,b,n,s=map(int,input().split())
    if(b<n):
        if(s%n<=b):
            m=(s-(s%n))//n
            if(m>=0 and m<=a):
                print("YES")
            else:
                print("NO")
        else:
            print("NO")
    else:
        if(b>=s):
          m=(s%n)
        else:
            m=b-(b%n)+(s%n)
            if(m>s):
                m-=n
        p=(s-m)//n
        if(p>=0 and p<=a):
            print("YES")
        else:
            print("NO")


q=int(input())
for j in range(q):
    a,b,n,s=map(int,input().split())
    if(b<n):
        if(s%n<=b):
            m=(s-(s%n))//n
            if(m>=0 and m<=a):
                print("YES")
            else:
                print("NO")
        else:
            print("NO")
    else:
        k=0
        m=s%n
        while(m<=b and m<=s):
            k+=1
            m=k*n +(s%n)
        m-=n
        p=(s-m)//n
        if(p>=0 and p<=a):
            print("YES")
        else:
            print("NO")


q = int(input())
for i in range(q):
    sm = 0
    a, b, n, S = map(int, input().split())
    if sm == S:
        print("YES")
    for j in range(a + b):
        if sm == S:
            print("YES")
            break
        else:
            if b > 0:
                sm += 1
                b -= 1
            if sm == S:
                print('YES')
                break
            else:
                if a > 0:
                    sm += n
                    a -= 1
        if a == 0 and b == 0 and sm != S:
            print('NO')
            break


q = int(input())
for i in range(q):
    sm = 0
    a, b, n, S = map(int, input().split())
    if sm == S:
        print("YES")
        continue
    for j in range(a + b):
        if sm == S:
            print("YES")
            break
        else:
            if b > 0:
                sm += 1
                b -= 1
            if sm == S:
                print('YES')
                break
            else:
                if a > 0:
                    sm += n
                    a -= 1
                if sm == S:
                    print('YES')
                    break
        if a == 0 and b == 0 and sm != S:
            print('NO')
            break


q = int(input())
for i in range(q):
    sm = 0
    a, b, n, S = map(int, input().split())
    if sm == S:
        print("YES")
    for j in range(a + b):
        if sm == S:
            print("YES")
            break
        else:
            if b > 0:
                sm += 1
                b -= 1
            if sm == S:
                print('YES')
                break
            else:
                if a > 0:
                    sm += n
                    a -= 1
                if sm == S:
                    print('YES')
                    break
        if a == 0 and b == 0 and sm != S:
            print('NO')
            break


q = int(input())
for i in range(q):
    sm = 0
    a, b, n, S = map(int, input().split())
    for j in range(a + b):
        if sm == S:
            print("YES")
            break
        else:
            if b > 0:
                sm += 1
                b -= 1
            if sm == S:
                print('YES')
                break
            else:
                if a > 0:
                    sm += n
                    a -= 1
        if a == 0 and b == 0 and sm != S:
            print('NO')
            break


for i in range(int(input())):
    a, b, n, s = map(int, input().split())
    if a * n <= s:
        sm = a * n
    else:
        sm2 = s // n
        sm = sm2 * n
    if s - sm <= b:
        print('YES')
    else:
        print('NO')


for _ in range(int(input())):
    a, b, n, S = map(int, input().split())
    while a > 0 and S - n >= 0:
        S -= n
        a -= 1
    S -= b
    print("YES") if S <= 0 else print("NO")


for _ in range(int(input())):
    a, b, n, S = map(int, input().split())
    if S // n <= a:
        S -= (S // n)*n + b
    else:
        S -= a*n + b
    print("YES") if S <= 0 else print("NO")


for _ in range(int(input())):
    a, b, n, S = map(int, input().split())
    while a*n > S:
        a -= 1
    S -= a*n + b
    print("YES") if S <= 0 else print("NO")


for _ in range(int(input())):
    a, b, n, S = map(int, input().split())
    while a > 0 and S - n >= 0:
        S -= n
        a -= 1
    while b > 0 and S > 0:
        S -= 1
        b -= 1
    print("YES") if S == 0 else print("NO")


t = int(input())
flg = 0
while(t):
    flg = 0

    t-=1
    a,b,n,s = map(int,input().split())
    for i in range(a+1):
        for j in range(b+1):
            if n*i + j == s:
                flg = 1
    if flg==1:
        print('YES')
    else:
        print('NO')


t = int(input())
while(t):
    t-=1
    a,b,n,s = map(int,input().split())
    if s//n <=a:
        if s - n*(s//n) <= b:
            print('YES')
        else:
            print('NO')
#     elif s<= a*n and b>= a*n-s :
#         print('YES')
#     elif s>=a*n and b>=s-a*n :
#         print('YES')
    else:
        print('NO')


t = int(input())
while(t):
    t-=1
    a,b,n,s = map(int,input().split())
    if s<=b:
        print('YES')
    elif s<= a*n and b>= a*n-s :
        print('YES')
    elif s>=a*n and b>=s-a*n :
        print('YES')
    else:
        print('NO')


t = int(input())
flg = 0
while(t):
    flg = 0

    t-=1
    a,b,n,s = map(int,input().split())
    if a>= s//n:
        a=s//n
    if n*a + b>=s:
        print('YES')
    else:
        print('NO')


m = int(input())
for i in range(m):
    a, b, n, S = map(int, input().split())
    if a * n <= S:
        max_with_n_only = a * n
    else:
        max_with_n_only = (S // n) * n
    print('YES') if max_with_n_only + b >= S else print('NO')


n = int(input())
for i in range(n):
    a, b, n, s = map(int, input().split())
    if (s // n) <= a and s - n * (s // n) <= b:
        print('YES')
    else:
        print("NO")


m = int(input())
for i in range(m):
    a, b, n, S = map(int, input().split())
    if a * n <= S:
        max_with_n_only = a * n
    else:
        max_with_n_only = S // n
    print('YES') if max_with_n_only + b >= S else print('NO')


import os
import sys

DEBUG = 'DEBUG' in os.environ

def inp():
    return sys.stdin.readline().rstrip()

def read_int():
    return int(inp())

def read_ints():
    return [int(e) for e in inp().split()]

def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)

##########################################

def main():
    a, b, n, S = read_ints()
    a_max = S // n
    if a > a_max:
        b_needed = S-a_max*n
    else:
        b_needed = S-a*n
    if b >= b_needed:
        return "YES"
    else:
        return "NO"

for _ in range(read_int()):
    print(main())


t = int(input())

for _ in range(t):
  a,b,n,S = map(int,input().split())

  p,q = divmod(S,n)
  if (a >=p):
    if q == 0:
      print('YES')
    elif (q <= b):
      print('YES')
    else:
      print('NO')
  elif (S - a* n <= b):
    print('YES')
  else:
    print('NO')


import os
import sys

DEBUG = 'DEBUG' in os.environ

def inp():
    return sys.stdin.readline().rstrip()

def read_int():
    return int(inp())

def read_ints():
    return [int(e) for e in inp().split()]

def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)

##########################################

def main():
    a, b, n, S = read_ints()
    a_max = S // n
    if a > a_max:
        b_needed = S-a_max*n
    else:
        b_needed = S-a*n
    if b > b_needed:
        return "YES"
    else:
        return "NO"

for _ in range(read_int()):
    print(main())


# Problem URL: https://codeforces.com/contest/1256/problem/A

def solve(a,b,n,s):
    x = s//n
    y = s%n
    if x<=a and y<=b:
        return True
    return False

q = int(input())

for _ in range(q):
    a,b,n,s = list(map(int,input().split()))
    if solve(a,b,n,s):
        print("YES")
    else:
        print("NO")


# Problem URL: https://codeforces.com/contest/1256/problem/A

def solve(a,b,n,s):
    if s%n <=b and (a*n + b) >= s:
        return True
    return False

q = int(input())

for _ in range(q):
    a,b,n,s = list(map(int,input().split()))
    if solve(a,b,n,s):
        print("YES")
    else:
        print("NO")


# Problem URL: https://codeforces.com/contest/1256/problem/A

def solve(a,b,n,s):
    if (a*n)+b < s:
        return False
    x = s//n
    y = s%n
    if x<=a and y<=b:
        return True
    return False

q = int(input())

for _ in range(q):
    a,b,n,s = list(map(int,input().split()))
    if solve(a,b,n,s):
        print("YES")
    else:
        print("NO")


t = int(input())
for i in range(t):
    a,b,n,s = list(map(int, input().split()))
    s -= a*n
    while s < 0:
        s += n

    if s <= b:
        print("YES")
    else:
        print("NO")


t = int(input())
for i in range(t):
    a,b,n,s = list(map(int, input().split()))
    s = max(s%n, s-(a*n))

    if s <= b:
        print("YES")
    else:
        print("NO")


t = int(input())
for i in range(t):
    a,b,n,s = list(map(int, input().split()))
    while s >= n and a > 0:
        s -= n
        a -= 1
    if s <= b:
        print("YES")
    else:
        print("NO")


def testAnswer():
    test_cases_count = int(input())
    for i in range(test_cases_count):
        a, b, n , S = map(int, input().strip().split())
        coins = [n]*a + [1]*b if n > 1 else [b] + [n]*a
        for coin in coins:
            S -= coin
            if S < 0:
                print("NO")
                break
            if S == 0:
                print("YES")
                break
        print("NO")

if __name__ == '__main__':
    testAnswer()


def testAnswer():
    test_cases_count = int(input())
    for i in range(test_cases_count):
        a, b, n , S = map(int, input().strip().split())
        coins = [n]*a + [1]*b if n > 1 else [b] + [n]*a
        for coin in coins:
            S -= coin
            if S < 0:
                print("NO")
                break
            if S == 0:
                print("YES")
                break
        if S > 0:
            print("NO")

if __name__ == '__main__':
    testAnswer()


def testAnswer():
    test_cases_count = int(input())
    for i in range(test_cases_count):
        a, b, n , S = map(int, input().strip().split())
        coins = [n]*a + [1]*b if n > 1 else [b] + [n]*a
        for coin in coins:
        S -= coin
        if S < 0:
            print("NO")
            break
        if S == 0:
            print("YES")
            break
        print("NO")

if __name__ == '__main__':
    testAnswer()


def testAnswer():
    test_cases_count = int(input())
    for i in range(test_cases_count):
        a, b, n , S = map(int, input().strip().split())
        if S % n > b:
            print("NO")
            continue
        if a * n + b >= S:
            print("YES")
            continue
        print("NO")
        # coins = [n]*a + [1]*b if n > 1 else [b] + [n]*a
        # for coin in coins:
        #     if S - coin < 0:
        #         continue
        #     S -= coin
        #     if S == 0:
        #         print("YES")
        #         break
        # if S > 0:
        #     print("NO")
if __name__ == '__main__':
    testAnswer()


def testAnswer():
    test_cases_count = int(input())
    for i in range(test_cases_count):
        a, b, n , S = map(int, input().strip().split())
        coins = [n]*a + [1]*b if n > 1 else [b] + [n]*a
        for coin in coins:
            if S - coin < 0:
                continue
            S -= coin
            if S == 0:
                print("YES")
                break
        if S > 0:
            print("NO")

if __name__ == '__main__':
    testAnswer()


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    elif n==1:
        if a+b>=s:
            print('YES')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        if flag:
            print('NO')

    t-=1


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        if flag:
            print('NO')

    t-=1


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    elif n==1:
        if a+b>=s:
            print('YES')
        else:
            print('NO')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        if flag:
            y=b
            nx=s-y
            nx=nx-(nx%n)
            x=nx//n
            if x<=a:
                print('YES')
                flag=0

        if flag:
            print('NO')

    t-=1


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    elif n==1:
        if a+b>=s:
            print('YES')
        else:
            print('NO')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        else:
            x=a
            y=s-(n*x)
            if y<=b and (x*n)+y==s:
                print('YES')
                flag=0

        if flag:
            y=b
            nx=s-y
            nx=nx-(nx%n)
            x=nx//n
            if x<=a:
                if (x*n)+y==s:
                    print('YES')
                    flag=0

        if flag:
            print('NO')

    t-=1


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    elif n==1:
        if a+b>=s:
            print('YES')
        else:
            print('NO')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        if flag:
            y=b
            nx=s-y
            nx=nx-(nx%n)
            x=nx//n
            if x<=a:
                if (x*n)+y==s:
                    print('YES')
                    flag=0

        if flag:
            print('NO')

    t-=1


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    elif n==1:
        if a+b>=s:
            print('YES')
        else:
            print('NO')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        if flag:
            y=b
            nx=s-y
            if nx%n==0:
                x=nx//n
                if x<=a:
                    print('YES')
                    flag=0

        if flag:
            print('NO')

    t-=1


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    elif n==1:
        if a+b>=s:
            print('YES')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        if flag:
            y=b
            nx=s-y
            if nx%n==0:
                x=nx//n
                if x<=a:
                    print('YES')
                    flag=0

        if flag:
            print('NO')

    t-=1


from sys import stdin
t=int(stdin.readline())
while t:
    a,b,n,s=map(int,stdin.readline().split())
    if b>=s:
        print('YES')
    elif n==1:
        if a+b>=s:
            print('YES')
        else:
            print('NO')
    else:
        flag=1
        x=s//n
        if x<=a:
            y=s-(n*x)
            if y<=b:
                print('YES')
                flag=0
        if flag:
            y=b
            nx=s-y
            nx=nx-(nx%n)
            x=nx//n
            if x<=a:
                if x*n+y==s:
                    print('YES')
                    flag=0

        if flag:
            print('NO')

    t-=1


for _ in range(int(input())):
    a,b,n,s=map(int,input().split())
    f=0
    if s%n==0:
        if s//n==a:
            f=1
            print("YES")
            break
        else:
            ans=n*a
            s-=ans
            if s==b:
                f=1
                print("YES")

    else:
        ans=s%n
        if ans<=b:
            f=1
            print("YES")
    if f!=1:
        print("NO")


for _ in range(int(input())):
    a,b,n,s=map(int,input().split())
    x=s//n
    ans=s-min(a,x)*n
    if ans<=b:
        print("YES")
    else:
        print("NO")


for _ in range(int(input())):
    a,b,n,s=map(int,input().split())
    f=0
    if s%n==0:
        if s//n<=a:
            f=1
            print("YES")
            break
        else:
            ans=n*a
            s-=ans
            if s==b:
                f=1
                print("YES")

    else:
        ans=s%n
        if ans<=b:
            f=1
            print("YES")
    if f!=1:
        print("NO")


q=int(input())
for i in range(q):
    a,b,n,S=[int(x) for x in input().split()]
    if(S%n>b):
        print("NO")
    elif(a*n+b>=S):
        print("YES")
    else:
        print("NO")


q=int(input())
for i in range(q):
    a,b,n,S=[int(x) for x in input().split()]
    d=S-(a*n)
    if(d<0):
        d=d*(-1)
        d=(d%n-n)*(-1)
        if d>b:
            print("NO")
        else:
            print("YES")
    elif(d==0):
        print("YES")
    else:
        if d>b:
            print("NO")
        else:
            print("YES")


q=int(input())
for i in range(q):
    a,b,n,S=[int(x) for x in input().split()]
    d=S-(a*n)
    if(d<0 and a<S):
        d=d*(-1)
        d=((d%n)-n)*(-1)
        if d>b:
            print("NO")
        else:
            print("YES")
    elif(d==0):
        print("YES")
    elif(d<0 and a>S):
        if(b>=S):
            print("YES")
        else:
            print("NO")
    else:
        if d>b:
            print("NO")
        else:
            print("YES")


t = int(input())
for case_num in range(t):
    a, b, n, s = map(int, input().split(' '))
    if b > n:
        a += (b - n) // n
        b = b % n + n
    na = s // n
    nb = s % n
    print("YES" if (a >= na and b >= nb) or (
        a == na - 1 and b >= nb + n) else "NO")


t = int(input())
for case_num in range(t):
    a, b, n, s = map(int, input().split(' '))
    if b > n:
        a += (b - n) // n
        b = b % n + n
    na = s // n
    nb = s % n
    print("YES" if a >= na and b >= nb else "NO")


t = int(input())
for case_num in range(t):
    a, b, n, s = map(int, input().split(' '))
    a += b // n
    b %= n
    na = s // n
    nb = s % n
    print("YES" if a >= na and b >= nb else "NO")


t = int(input())
for case_num in range(t):
    a, b, n, s = map(int, input().split(' '))
    if s <= b:
        print("YES")
        continue
    a += b // n
    b %= n
    na = s // n
    nb = s % n
    print("YES" if a >= na and b >= nb else "NO")


for x in range(int(input())):
	a,b,n,s=map(int,input().split())
	t=s%n
	d=s//n
	if b==s:
		print("YES")
	elif t<=b and d<=a:
		print("YES")
	elif d>a and t<=b:
		if (a*n)+b>=s:
			print("YES")
		else:
			print("NO")
	elif d<=a and t>b:
		if b+(d*n)>=s:
			print("YES")
		else:
			print("NO")
	else:
		print("NO")


for x in range(int(input())):
	a,b,n,s=map(int,input().split())
	t=s%n
	d=s//n
	if t<=b and d<=a:
		print("YES")
	else:
		print("NO")


for x in range(int(input())):
	a,b,n,s=map(int,input().split())
	t=s%n
	d=s//n
	if b==s:
		print("YES")
	elif t<=b and d<=a:
		print("YES")
	else:
		print("NO")


#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>

using namespace std;
typedef long long int ll;
typedef long double ld;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll q, a, b, n, S;
	cin >> q;
	while(q--) {
		cin >> a >> b >> n >> S;
		cout << ((a * n + b >= S) && (S % n <= b) ? "YES" : "NO") << endl;
	}
	return 0;
}


#include<bits/stdc++.h>

#define int long long

using namespace std;

int32_t main() {
    int t = 1; cin >> t;
    while (t--) {
        int a, b, n, s; cin >> a >> b >> n >> s;
        int l = min(s / n, a);
        if (s - l * n <= b) cout << "YES\n";
        else cout << "NO\n";
    }
    return 0;
}


q = int(input())
for i in range(q):
    a, b, n, S = map(int, input().split())
    if a * n >= S:
        x = S // n
    else:
        x = a
    if b >= S - x * n:
        print('YES')
    else:
        print('NO')


def pwc(a,b,n,s):
    c=s//n
    if(c<=a):
        s=s-(c*n)
        if(s==0):
            print('yes')
            return
        elif(s<=b):
            print('yes')
            return
        else:
            print('no')
            return
    elif(s<=b):
        print('yes')
        return
    elif(s>b):
        s=s-b
        if(s/n == s//n and s<=a*n):
            print('yes')
        else:
            print('no')
        return
    else:
        print('no')
    return
n=int(input())
for i in range(n):
    t=input()
    l= list(map(int,t.split(" ")))
    pwc(l[0],l[1],l[2],l[3])


def pwc(a,b,n,s):
    c=s%n
    if(c<=b):
        print('yes')
        return
    elif((a*n)+b >=s):
        print('yes')
    else:
        print('no')
    return
n=int(input())
for i in range(n):
    t=input()
    l= list(map(int,t.split(" ")))
    pwc(l[0],l[1],l[2],l[3])


def pwc(a,b,n,s):
    c=s%n
    if(c>b):
        print('no')
        return
    elif((a*n)+b >=s):
        print('yes')
    else:
        print('no')
    return
n=int(input())
for i in range(n):
    t=input()
    l= list(map(int,t.split(" ")))
    pwc(l[0],l[1],l[2],l[3])


def pwc(a,b,n,s):
    c=s//n
    if(c<=a):
        s=s-(c*n)
        if(s==0):
            print('yes')
            return
        elif(s<=b):
            print('yes')
            return
        else:
            print('no')
            return
    elif(s<=b):
        print('yes')
        return
    else:
        print('no')
    return
n=int(input())
for i in range(n):
    t=input()
    l= list(map(int,t.split(" ")))
    pwc(l[0],l[1],l[2],l[3])


q = int(input().strip())
for _ in range(q):
    a,b,n,S = map(int, input().strip().split())
    if a*n + b < S:
        print('no')
    else:
        ans = S//n
        if ans >= a:
            print('yes')
        elif ans == 0:
            if b >= S:
                print('yes')
            else:
                print('no')
        else:
            if ans*n == S:
                print('yes')
            else:
                if ans*n - n + b >= S:
                    print('yes')
                else:
                    print('no')


q = int(input().strip())
for _ in range(q):
    a,b,n,S = map(int, input().strip().split())
    if a*n + b < S:
        print('no')
    else:
        ans = 0
        while a:
            if ans + n > S:
                break
            ans += n
            a -= 1
        if S - ans > b:
            print('no')
        else:
            print('yes')


q = int(input().strip())
for _ in range(q):
    a,b,n,S = map(int, input().strip().split())
    if a*n + b < S:
        print('no')
    else:
        ans = S//n
        if ans >= a:
            print('yes')
        else:
            if ans*n == S:
                print('yes')
            else:
                if ans*n - n + b >= S:
                    print('yes')
                else:
                    print('no')


q = int(input().strip())
for _ in range(q):
    a,b,n,S = map(int, input().strip().split())
    if a*n + b < S:
        print('no')
    else:
        ans = S//n
        if ans >= a:
            print('yes')
        elif ans == 0:
            if b >= S:
                print('yes')
            else:
                print('no')
        else:
            if ans*n == S:
                print('yes')
            else:
                if ans*n  + b >= S:
                    print('yes')
                else:
                    print('no')


q = int(input())
for j in range (q):
    a, b, n, S = map(int, input().split())
    if a * n < S:
        S = S - a*n
    if a * n > S:
        S = S % n
    if b >= S:
        print('YES')
    else:
        print('NO')


q = int(input())
for j in range (q):
    k = True
    a, b, n, S = map(int, input().split())
    S = S - a*n
    if S >= 0:
        if b >= S:
            print('YES')
            k = False
    if S < 0:
        while S < 0:
            S += n
        if S >= 0:
            if b >= S:
                print('YES')
                k = False
    if k:
        print('NO')


q = int(input())
for j in range (q):
    a, b, n, S = map(int, input().split())
    if a * n <= S:
        S = S - a*n
        if b >= S:
            print('YES')
            continue
        else:
            print('NO')
            continue
    if a * n > S:
        if a * n - S <= b:
            print('YES')
            continue
        else:
            print('NO')
            continue


q = int(input())
for j in range (q):
    te = 0
    ke = 0
    a, b, n, S = map(int, input().split())
    if a * n <= S:
        S = S - a*n
        if b >= S:
            print('YES')
            continue
        else:
            print('NO')
            continue
    if a * n > S:
        te = S % n
        ke = te * n
        if S - ke <= b:
            print('YES')
            continue
        else:
            print('NO')
            continue


q = int(input())
for j in range (q):
    k = True
    a, b, n, S = map(int, input().split())
    S = S - a*n
    if S >= 0:
        if b >= S:
            print('YES')
            k = False
    if k:
        print('NO')


q = int(input())
for j in range (q):
    a, b, n, S = map(int, input().split())
    if a * n <= S:
        S = S - a*n
    if a * n > S:
        S = S % n
    if b >= S:
        print('YES')
    else:
        print('NO')


q = int(input())
for j in range (q):
    a, b, n, S = map(int, input().split())
    if a * n <= S:
        S = S - a*n
        if b >= S:
            print('YES')
            continue
        else:
            print('NO')
            continue
    if a * n > S:
        if a * n - S < b:
            print('YES')
            continue
        else:
            print('NO')
            continue


q = int(input())
for j in range (q):
    te = 0
    ke = 0
    a, b, n, S = map(int, input().split())
    if a * n <= S:
        S = S - a*n
        if b >= S:
            print('YES')
            continue
        else:
            print('NO')
            continue
    if a * n > S:
        te = S // n
        ke = te * n
        if S - ke <= b:
            print('YES')
            continue
        else:
            print('NO')
            continue


q = int(input())
for j in range (q):
    a, b, n, S = map(int, input().split())
    su = 0
    for i in range(a):
        if su > S:
            su -= n
            break
        su += n
    for i in range(b):
        su += 1
        if su == S:
            print('YES')
            break
    else:
        print('NO')


q = int(input())
for j in range (q):
    k = True
    a, b, n, S = map(int, input().split())
    su = 0
    for i in range(a):
        if su > S:
            su -= n
            break
        su += n
        if su == S:
            print('YES')
            break
            k = False
    if k:
        for i in range(b):
            su += 1
            if su == S:
                print('YES')
                break
    if su != S:
        print('NO')


k = int(input())
for _ in range(k):
    a, b, n, S = [int(x) for x in input().split()]
    if ((S % n <= b) and (a * n + b >= S)):
        print("YES")
    else:
        print("NO")


k = int(input())
for _ in range(k):
    t = int(input())
    a, b, n, S = [int(x) for x in input().split()]
    flag = 0

    for i in range(1, a+1):
        if i * n + b >= S:
            flag = 1
            break
    if flag:
        print("YES")
    else:
        print("NO")


k = int(input())
for _ in range(k):
    a, b, n, S = [int(x) for x in input().split()]
    flag = 0
    if (S % n <= b && a * n + b >= S)
        print("YES")
    else:
        print("NO")


k = int(input())
for _ in range(k):
    a, b, n, S = [int(x) for x in input().split()]
    flag = 0

    for i in range(a + 1):
        for j in range(b + 1):
            if i * n + j == S:
                flag = 1
                break
    if flag:
        print("YES")
    else:
        print("NO")


#include <bits/stdc++.h>

using namespace std;
#define EPS 0.0000001
#define ll64 long long
int main()
{
    //freopen("input.txt", "r", stdin);
    vector<ll64> vec;
    int n;
    cin >> n;
    double w;
    cin >> w;
    for(int i = 0; i < 2 * n; i++){
        ll64 a;
        cin >> a;
        vec.push_back(a);
    }
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());
    double ans = 0;
    int limit = vec.size() / 2;
    for(int i = 0; i < limit; i++){
        double temp = vec[i] / 2.0;
        double temp2 = vec[i + limit];
        ans += (min(temp, temp2) * 3);
    }
    if(ans > w && w < 100000) ans = w;
    printf("%.6lf", ans);
}


#include <bits/stdc++.h>

using namespace std;
#define EPS 0.0000001
int main()
{
    freopen("input.txt", "r", stdin);
    vector<int> vec;
    int n;
    cin >> n;
    double w;
    cin >> w;
    for(int i = 0; i < 2 * n; i++){
        int a;
        cin >> a;
        vec.push_back(a);
    }
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());
    double ans = 0;
    int limit = vec.size() / 2;
    for(int i = 0; i < limit; i++){
        double temp = vec[i] / 2.0;
        double temp2 = vec[i + limit];
        ans += (min(temp, temp2) * 3);
    }
    if(ans > w) ans = w;
    cout << ans << "\n";
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    //freopen("input.txt", "r", stdin);
    vector<int> vec;
    int n, w;
    cin >> n >> w;
    for(int i = 0; i < 2 * n; i++){
        int a;
        cin >> a;
        vec.push_back(a);
    }
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());
    double ans = 0;
    int limit = vec.size() / 2;
    for(int i = 0; i < limit; i++){
        double temp = vec[i];
        ans += temp + (temp / 2.0);
    }
    if(ans > w) ans = w;
    cout << ans << "\n";
}


#include <bits/stdc++.h>

using namespace std;
#define EPS 0.0000001
int main()
{
    //freopen("input.txt", "r", stdin);
    vector<int> vec;
    int n;
    cin >> n;
    double w;
    cin >> w;
    for(int i = 0; i < 2 * n; i++){
        int a;
        cin >> a;
        vec.push_back(a);
    }
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());
    double ans = 0;
    int limit = vec.size() / 2;
    for(int i = 0; i < limit && ans <= w; i++){
        double temp = vec[i] / 2.0;
        double temp2 = vec[i + limit];
        ans += (min(temp, temp2) * 3);
    }
    if(ans > w) ans = w;
    cout << ans << "\n";
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    int n = 0;
    double w = 0.0;
    scanf("%d %lf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%lf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%lf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;

	printf("%.10lf\n", double(n) * min_girl + double(n) * min_boy);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

long double ara[N];

int main()
{
    freopen("in", "r", stdin);
    freopen("out", "w", stdout);
    long long n = 0.0;
    long double w = 0.0;
    scanf("%I64d %llf", &n, &w);

    for (long long i = 1; i <= 2 * n; ++i) {
	scanf("%llf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    long double min_girl = ara[1];
    long double min_boy = ara[n + 1];

    if (w < min_girl) printf("%llf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;

	printf("%llf\n", double(n) * min_girl + double(n) * min_boy);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

long double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    long long n = 0.0;
    long double w = 0.0;
    scanf("%I64d %llf", &n, &w);

    for (long long i = 1; i <= 2 * n; ++i) {
	scanf("%llf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    long double min_girl = ara[1];
    long double min_boy = ara[n + 1];

    if (w < min_girl) printf("%llf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;

	long double ans = n * min_girl + n * min_boy;

	printf("%llf\n", ans);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    int n = 0.0;
    double w = 0.0;
    scanf("%d %lf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%lf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%lf\n", w);
    else {
	min_girl = min(min_girl, min_boy / 2.0);
	//min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;
	double ans = 3.0 * min_girl * n;

	printf("%lf\n", ans);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    int n = 0.0;
    double w = 0.0;
    scanf("%d %lf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%lf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%lf\n", w);
    else {
	min_girl = min(min_girl, min_boy / 2.0);
	//min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;
	double ans = 3.0 * min_girl * n;

	printf("%.10lf\n", ans);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

int ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    int n = 0;
    double w = 0.0;
    scanf("%d %lf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%d", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%lf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;

	printf("%lf\n", double(n) * min_girl + double(n) * min_boy);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

long double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    long long n = 0.0;
    long double w = 0.0;
    scanf("%I64d %llf", &n, &w);

    for (long long i = 1; i <= 2 * n; ++i) {
	scanf("%llf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    long double min_girl = ara[1];
    long double min_boy = ara[n + 1];

    if (w < min_girl) printf("%llf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;

	long double ans = n * min_girl + n * min_boy;

	printf("%llf\n", ans;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

double ara[N];

int main()
{
    freopen("in", "r", stdin);
    freopen("out", "w", stdout);
    int n = 0.0;
    double w = 0.0;
    scanf("%d %lf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%lf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%lf\n", w);
    else {
	min_girl = min(min_girl, min_boy / 2.0);
	//min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;
	double ans = 3.0 * min_girl * n;

	printf("%.10lf\n", ans);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    int n = 0.0;
    double w = 0.0;
    scanf("%d %lf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%lf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%.10lf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;
	double ans = n * min_girl + n * min_boy;
	ans = min(w, ans);

	printf("%.10lf\n", ans);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    int n = 0.0;
    double w = 0.0;
    scanf("%d %lf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%lf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%lf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	//min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;
	double ans = 3.0 * min_girl * n;

	printf("%lf\n", ans);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    int n = 0.0;
    double w = 0.0;
    scanf("%d %llf", &n, &w);

    for (int i = 1; i <= 2 * n; ++i) {
	scanf("%lf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%lf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;

	printf("%lf\n", n * min_girl + n * min_boy);
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

long double ara[N];

int main()
{
    //freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
    long long n = 0.0;
    long double w = 0.0;
    scanf("%I64d %llf", &n, &w);

    for (long long i = 1; i <= 2 * n; ++i) {
	scanf("%llf", ara + i);
    }

    sort(ara + 1, ara + 2 * n + 1);

    double min_girl = ara[1];
    double min_boy = ara[n + 1];

    if (w < min_girl) printf("%llf\n", w);
    else {
	min_girl = (2.0 * min_girl > min_boy) ? min_boy / 2.0 : min_girl;
	min_boy = (2.0 * min_girl < min_boy) ? 2.0 * min_girl : min_boy;

	printf("%llf\n", double(n) * min_girl + double(n) * min_boy);
    }

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > max_ || 3*n*mid > c ){

            h = mid ;

        }
        else{
            prev = ans ;
            ans = mid ;

            if ( (ans - prev) <= (1.0/100000000.0) ){
                break;
            }

            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;
    //printf("%1f\n",29010000000.0) ;
    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

        //cout<< n << c <<endl;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
            if ( ( h - mid ) <= ( 1.0 /  10000000000.0 )  ){
            break;
        }

        }

    }

   // cout<<ans<<endl;

    printf("%1f\n",3*n*ans) ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( ( h - l ) <= ( 1.0 /  100000000000000000.0 )  ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( ( h - l ) <= ( 1.0 /  10000000000.0 )  ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( ( h - l ) <= ( 1.0 /  1000000000000000.0 )  ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( ( h - l ) <= ( 1.0 /  100000000000000.0 )  ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;
    //printf("%1f\n",29010000000.0) ;
    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

        //cout<< n << c <<endl;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
            if ( ( h - mid ) <= ( 1.0 /  10000000000000.0 )  ){
            break;
        }

        }

    }

   // cout<<ans<<endl;

    printf("%1f\n",3*n*ans) ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans ;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( (h - l) <= (1.0/10000000.0) ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > max_ || 3*n*mid > c ){

            h = mid ;

        }
        else{
            ans = mid ;
            l = mid ;
        }

    }

    //cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;
    //printf("%1f\n",29010000000.0) ;
    int a[200010] ;

    double  mid , ans = 0 ;

    scanf ( "%d%d" , &n,&c ) ;

        //cout<< n << c <<endl;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        scanf ( "%d",&a[i]);

    }
    sort ( a , a + 2*n ) ;

    int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
            if ( ( h - mid ) <= ( 1.0 /  1000000000000.0 )  ){
            break;
        }

        }

    }

   // cout<<ans<<endl;

    printf("%1f\n",3*n*ans) ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{
            prev = ans ;
            ans = mid ;

            if ( (ans - prev) <= (1.0/100000000.0) ){
                break;
            }

            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans ;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( (h - l) <= (1.0/1000000.0) ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > max_ || 3*n*mid > c ){

            h = mid ;

        }
        else{
            ans = mid ;
            l = mid ;
        }

    }

    //cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( ( h - l ) <= ( 1.0 /  100000000.0 )  ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
            if ( ( h - mid ) <= ( 1.0 /  1000000000000000.0 )  ){
            break;
        }

        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > max_ || 3*n*mid > c ){

            h = mid ;

        }
        else{
            prev = ans ;
            ans = mid ;

            if ( (ans - prev) <= (1.0/10000000.0) ){
                break;
            }

            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;
    //printf("%1f\n",29010000000.0) ;
    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

        cout<< n << c <<endl;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
            if ( ( h - mid ) <= ( 1.0 /  10000000000000.0 )  ){
            break;
        }

        }

    }

   // cout<<ans<<endl;

    printf("%1f\n",3*n*ans) ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
            if ( ( h - mid ) <= ( 1.0 /  10000000000000.0 )  ){
            break;
        }

        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include<bits/stdc++.h>

using namespace std ;

int main ( ) {

    int n , c ;

   // cout<< 1.0 - (1.0/1000000.0) <<endl;

    long int min_ = 1111111111 , a[200010] , max_ = -1 ;

    double  mid , ans = 0 , prev = 0;

    cin >> n >> c ;

    for ( int i = 0 ; i < 2*n ; i++ ) {

        cin>>a[i];
        min_ = min ( min_ , a[i] ) ;
        max_ = max ( max_ , a[i] ) ;

    }
    sort ( a , a + 2*n ) ;

    long int k = a[n] ;

    double l = 0 ;

    double h = min_ ;

    while ( l <= h ) {

        if ( ( h - l ) <= ( 1.0 /  1000000000000.0 )  ){
            break;
        }

         mid = ( l + h ) / 2.0 ;

        if ( 2*mid > k || 3*n*mid > c ){

            h = mid ;

        }
        else{

            ans = mid ;
            l = mid ;
        }

    }

   // cout<<ans<<endl;

    cout << 3*n*ans << endl ;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,w,i;
	double min,amt,ans;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));
	if(a[n] < (2*a[0]))
		min=a[n]/2.0;
	else
		min=a[0];
	amt = w/(n*3.0);
	if(amt > min)
		amt = min;
	ans=3*n*amt;
	// trace3(min,ans,amt);
	cout<<ans<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,i;
	double ans,w;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));
	ans = min(min(3*n*a[0],3*n*a[n]/2.0),w) ;
	ans=max(ans,min(w,n*a[n]));
	cout<<setprecision(6)<<ans<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,w,i;
	double minx,amt,ans;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));

	minx=(a[0]<a[n]/2.0)?a[0]:a[n]/2.0;
	amt = w/(n*3.0);
	amt=min(minx,amt);
	ans=3*n*amt;

	a[0]-=amt;
	a[n]-=2*amt;

	minx=(a[0]<a[n]/2.0)?a[0]:a[n]/2.0;
	if(minx > 0 && w-(ans + 3*n*minx) >= 0)
	{
		amt=minx;
		ans+=3*n*amt;
	}
	cout<<ans<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,w,i;
	double min,amt,ans;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));

	if(a[n] < (2*a[0]))
		min=a[n]/2.0;
	else
		min=a[0];

	amt = w/(n*3.0);
	if(amt > min)
		amt = min;
	ans=3*n*amt;
	a[0]-=amt;
	a[n]-=2*amt;
	min=(a[0]<a[n]/2.0)?a[0]:a[n]/2.0;
	if(min > 0 && ans + 3*n*min <=w)
	{
		amt=min;
		ans+=3*n*amt;
	}
	cout<<ans<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,w,i;
	double minx,amt,ans=0;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));
	double tot=0;
	rep(i,0,n)
	{
		a[i]-=tot;a[n+i]-=2*tot;
		minx=(a[i]<a[n+i]/2.0)?a[i]:a[n+i]/2.0;
		amt = min(minx,w/((n-i)*3.0));
		if(amt>0)
		{
			tot+=amt;
			ans+=3*(n-i)*amt;
		}
	}
	cout<<ans<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,w,i;
	double min,amt,ans;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));
	if(a[n] < (2*a[0]))
		min=a[n]/2.0;
	else
		min=a[0];
	amt = w/(n*3.0);
	if(amt > min)
		amt = min;
	ans=3*n*amt;
	if(a[0] - amt > 0 && a[n] - 2*amt >= 2*a[0])
	{
		amt=a[0];
		ans+=3*n*amt;
	}
	cout<<ans<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,i;
	double ans,w;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));
	ans = min(min(3*n*a[0],3*n*a[n]/2.0),w) ;
	cout<<setprecision(6)<<ans<<"\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,i;
	double minx,amt,ans,w;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));
	minx=(2*a[0]<a[n])?a[0]:a[n]/2.0;
	amt = w/(n*3.0);
	amt=min(minx,amt);
	ans=3*n*amt;
	printf("%.6lf\n",ans);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long int ll;

#define mi 1000000007
#define fastScan ios_base::sync_with_stdio(0);
#define rep(i,a,b) for(i=a;i<b;i++)
#define repv(i,a,b) for(i=a;i>b;i--)
#define pb push_back
#define mp make_pair
#define let(x,a) __typeof(a) x(a)
#define tr(v,it) for(let(it,v.begin()); it != v.end(); it++)
#define SET(a,b) memset(a,b,sizeof(a))

#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

int mult(int x,int y)
{
	ll ans,x1=(ll)x,y1=(ll)y;
	ans=(x1*y1)%mi;
	return (int)ans;
}
int gcd(int a,int b) { return b==0 ? a : gcd (b,a%b);}
int lcm(int a,int b) { return a*(b/gcd(a,b));}

int pow1(int a,int b)
{
	int ans=1;
	while(b>0) {
		if(b&1) ans=mult(ans,a);
		a=mult(a,a); b>>=1;
	}
	return ans;
}

int main()
{
	fastScan;
	int n,i;
	double ans,w;
	double a[200010];
	cin>>n>>w;
	rep(i,0,(2*n))
	{
		cin>>a[i];
	}
	sort(a,a+(2*n));
	ans = min(min(3*n*a[0],3*n*a[n]/2.0),w) ;
	ans=max(ans,min(w,n*a[n]));
	cout<<ans<<"\n";
	return 0;
}