C++ void函数 输出出错了

#include<iostream>
using namespace std;

bool bol(int x)
{
    int sum=0;
    for (int i = 2; i < x; i++)
    {
        if (x % i == 0)
        {
            sum++;
        }
    }
    if (sum == 0)
        return true;
    else return false;
}

void fun(int & x)
{
    int b=2;
    while (b < x)
    {
        int a = x - b;
        if (bol(b))
        {
            if (bol(a))
            {
                cout << b << " " << a;
                break;
            }
            else
                b++;
        }
        else b++;
    }
}

int main()
{
    int y;
    cin >> y;
    if (y % 2 == 0 && y > 2)
    {
        fun(y);
        cout <<y;
    }
    return 0;
}

输出出了什么错?何不具体描述一下呢?

建议把预期的结果和得到的结果都贴出来。

输出重复了 哎