Technically, to be deductible to Yco, the fees need to be for work that Xco has done for Yco. The fees also need to be reasonable. In practice, CRA auditors are usually lenient in allowing Yco the deduction without requiring too much evidence of how much work Xco has done, as long as the companies are under the same ownership.
GST/HST may need to be charged on the fees, with Xco remitting the tax and Yco claiming an offsetting input tax credit. However provided the two companies are under at least 90% common corporate ownership (both being owned by the same individual doesn’t work), they can file a Form RC4616 with the CRA, to elect for charges between them to be at “nil consideration”, meaning that no GST or HST needs to be charged and paid.
The above is a general description. In any given case you may wish to get professional advice as to whether the intercompany fees your companies are planning to charge are reasonable and will be deductible to the paying company.