Contain is related to Hold. Hold is a synonym of Prevail. Prevail is a type of Win. 
Necessity is related to Paper. Paper is related to Square. 
Contain <--RelatedTo--> Hold <--Synonym--> Prevail --IsA--> Win 
Necessity <--RelatedTo--> Paper <--RelatedTo--> Square 