In traditional recommendation algorithms, the users and/or the items with the same rating scores are equally treated. In real world, however, a user may prefer some items to other items and some users are more loyal to a certain item than other users. In this paper, therefore, we propose a weighted similarity measure by exploiting the difference in user-item relationships. In particular, we refer to the most important item of a user as his core item and the most important user of an item as its core user. We also propose a Core-User-Item Solver (CUIS) to calculate the core users and core items of the system, as well as the weighting coefficients for each user and each item. We prove that the CUIS algorithm converges to the optimal solution efficiently. Based on the weighted similarity measure and the obtained results by CUIS, we also propose three effective recommenders. Through experiments based on real-world data sets, we show that the proposed recommenders outperform corresponding traditional-similarity based recommenders, verify that the proposed weighted similarity can improve the accuracy of the similarity, and then improve the recommendation performance.