I have two collider in one game object how to distinguish between them when colliding with another?

I’m making a 2D game, there is one player with two collider : a box collider 2D on top and a small circle collider 2D bottom. When the player jump on the box he will be ok, but when he collide with the box with his face(box collider 2D) he will die ?
How can I do that? I tried this , but it not work.
Please help me.Thanks!

if (GetComponent<Collider2D>().GetType() == typeof(BoxCollider2D))
{
//do something
}
if (GetComponent<Collider2D>().GetType() == typeof(CircleCollider2D))
{
//do something
}

Hi, you can achieve this by many ways such as two collision scripts for head and body or one script attached to both head and body.some of the ways of distinguishing two objects are by name or tag etc. In your case, name would be the right choice.Below snippet may help you

void OnTriggerEnter(Collider col)
{
    if(this.gameObject.name=="Head")//Or this.gameobject.tag=="Head"
	{
	}
	else if(this.gameObject.name ="Body")//Or this.gameobject.tag=="Body"
	{
	
	}

}

Hope this may help you.
Nsks