Layout design for yield and reliability