while (scanf("%d",&num) != EOF){
    nums.push_back(num);
}
int len = nums.size();
int one = nums[len - 3],two = nums[len - 2],three = nums[len - 1];
nums.erase(nums.begin + len - 3,nums.end());