#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;

#define LENGTH 1000

int main(int argc, char *argv[]) {
    int length1 = LENGTH, length2 = LENGTH;
    if (argc > 1) {
        length1 = length2 = atoi(argv[1]);
        if (argc > 2) {
            length2 = atoi(argv[2]);
        }
    }
    srand(time(NULL));
    for (int j = 0; j < length1; ++j) {
        cout << rand() << ' ';
    }
    cout << endl;
    for (int j = 0; j < length2; ++j) {
        cout << rand() << ' ';
    }
    cout << endl;
}
