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

typedef unsigned long long int u64;
 
int main()
{
    std::priority_queue<pair<u64, pair<u64, u64>>> pq;
    u64 n, k;
    std::vector<u64> a_n;
    std::vector<u64> f_n;
    
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> a_n[i];
    }

    for (int i = 0; i < n; i++) {
        cin >> f_n[i];
    }

    std::sort(a_n.begin(), a_n.end());
    std::sort(f_n.begin(), f_n.end(), std::greater<u64>());
    
    for(int i = 0 ; i < n; i++) {
        pair<u64, u64> p1;
        p1.first = a_n[i];
        p1.second = f_n[i];
        
        pair<u64, pair<u64, u64>> p2;
        p2.first = p1.first * p1.second;
        p2.second = p1;
        
        pq.push(p2);
    }
    
    for(int i = 0; i < k; i++) {
        pair<u64, pair<u64, u64>> p = pq.top();
        pq.pop();
        
        if(p.second.first != 0) {
            p.second.first--;
            p.first = p.second.first * p.second.second;
        }
        
        pq.push(p);
    }
    
    cout << 1;
    std::cout << pq.size() << std::endl;
    std::cout <<  pq.top().first << std::endl;
    return 0;
}
