Use this in F2:
Formula: copy to clipboard
=IF(COUNTIF(C$2:C2;C2)=1,SUMIF(C:C,C2,E:E),"")


And use this in G2:
Formula: copy to clipboard
=IF(COUNTIFS(C$2:C2,C2,D$2:D2,D2)=1,SUMIFS(E:E,C:C,C2,D:D,D2),"")


And extend formula down