import re


def DoesSMILESFileContainTitleLine(FileName):
    """Determine whether the SMILES file contain a title line based on the  presence
    of a string SMILES, Name or ID in the first line.

    Arguments:
        FileName (str): Name of a file.

    Returns:
        bool : True, File contains title line; Otherwise, False.

    """
    
    Infile = open(FileName, "r")
    if Infile is None:
        return False

    Line = Infile.readline()
    Infile.close()

    if re.search("(SMILES|Name|ID)", Line, re.I):
        return True
        
    return False