#import <Foundation/Foundation.h>
#import <stdarg.h>

@interface StdIO : NSObject
+(NSMutableString*)stringFromStdIn; // 標準入力から NSString を得る
+(void)printf:(NSString*)format, ...; // 標準出力へ出力
@end

@implementation StdIO
+(NSMutableString*)stringFromStdIn
{
    NSFileHandle *handle = [NSFileHandle fileHandleWithStandardInput];
    NSMutableString *result = [NSMutableString string];
    NSData *data = [handle availableData];
    while ([data length] > 0) {
        [result appendString:[[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]];
        data = [handle availableData];
    }
    NSUInteger length = [result length];
    if (length >= 1 && [result characterAtIndex:length-1] == '\n') { // 入力末尾に改行文字があれば削除
        [result deleteCharactersInRange:NSMakeRange(length-1,1)];
    }
    return result;
}
+(void)printf:(NSString*)format, ...
{
    va_list arguments;
    va_start(arguments, format);
    NSString *string = [[[NSString alloc] initWithFormat:format arguments:arguments] autorelease];
    NSFileHandle *fileHandle = [NSFileHandle fileHandleWithStandardOutput];
    [fileHandle writeData:[string dataUsingEncoding:NSUTF8StringEncoding]];
    va_end(arguments);
}
@end

@interface TripPoint : NSObject
{
    NSInteger _t;
    NSInteger _x;
    NSInteger _y;
}
@property NSInteger t;
@property NSInteger x;
@property NSInteger y;
-(instancetype)initWithT:(NSInteger)t x:(NSInteger)x y:(NSInteger)y;
-(instancetype)initWithLine:(NSString*)line;
-(NSInteger)distanceFrom:(TripPoint*)point;
-(BOOL)canComeFrom:(TripPoint*)point;
@end

@implementation TripPoint
@synthesize t = _t;
@synthesize x = _x;
@synthesize y = _y;

-(instancetype)initWithT:(NSInteger)t x:(NSInteger)x y:(NSInteger)y
{
    if (self = [super init]) {
        self.t = t;
        self.x = x;
        self.y = y;
    }
    return self;
}

-(instancetype)initWithLine:(NSString*)line;
{
    if (self = [super init]) {
        NSArray *numbers = [line componentsSeparatedByString:@" "];
        self.t = [[numbers objectAtIndex:0] integerValue];
        self.x = [[numbers objectAtIndex:1] integerValue];
        self.y = [[numbers objectAtIndex:2] integerValue];
    }
    return self;
}

-(NSInteger)distanceFrom:(TripPoint*)point
{
    return ABS(self.x - point.x) + ABS(self.y - point.y);
}

-(NSInteger)timeFrom:(TripPoint*)point
{
    return self.t - point.t;
}

-(BOOL)canComeFrom:(TripPoint*)point
{
    NSInteger time = [self timeFrom:point];
    NSInteger distance = [self distanceFrom:point];
    return (time >= distance) && ((time-distance)%2 == 0);
}
@end

int main() {
    @autoreleasepool {
        NSArray *lines = [[StdIO stringFromStdIn] componentsSeparatedByString:@"\n"];
        NSInteger N = [(NSString*)[lines objectAtIndex:0] integerValue];
        TripPoint *currentPoint = [[[TripPoint alloc] initWithT:0 x:0 y:0] autorelease];
        for (NSInteger i=1; i<=N; i++) {
            NSString *line = [lines objectAtIndex:i];
            TripPoint *nextPoint = [[[TripPoint alloc] initWithLine:line] autorelease];
            if ([nextPoint canComeFrom:currentPoint]) {
                currentPoint = nextPoint;
            } else {
                [StdIO printf:@"No"];
                return 0;
            }
        }
        [StdIO printf:@"Yes"];
    }
    return 0;
}
