class Solution {
public:
vector<int> findNumbersWithSum(vector<int>& nums, int target) {
sort(nums.begin(),nums.end());
int s=target;
for(int i=0;i<nums.size();i++){
int g=nums[i];
for(int j=i+1;j<nums.size();j++){
if(nums[j]==(s-g)) return {nums[i],nums[j]};
}
}
}
};